Created
November 26, 2025 09:47
-
-
Save nukhes/7938f46570f4c5be409bf415713ff1f8 to your computer and use it in GitHub Desktop.
Enviar copia de sua chave SSH automáticamente pra um server ou VM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ``` | |
| ssh-keygen -t rsa | |
| type $env:USERPROFILE\.ssh\id_rsa.pub | ssh usuario@IPADDRESS "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys" | |
| ``` | |
| Permissões dentro da VM | |
| ```bash | |
| chmod 700 ~/.ssh | |
| chmod 600 ~/.ssh/authorized_keys | |
| ``` | |
| ``` | |
| ssh usuario@IPADDRESS | |
| ``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment