Skip to content

Instantly share code, notes, and snippets.

@MarioRinaldi
Last active January 2, 2019 13:13
Show Gist options
  • Save MarioRinaldi/1683b4294a8fabd235a6 to your computer and use it in GitHub Desktop.
Save MarioRinaldi/1683b4294a8fabd235a6 to your computer and use it in GitHub Desktop.
Configurando ssh-rsa
# no Computador cliente (remetente)
1) editar o arquivo *~/.ssh/config* e adicionar as seguintes linhas:
Host NOME_DO_SERVIDOR
Hostname IP_DO_SERVIDOR
User USUARIO_LOGADO_DO_SERVIDOR
IdentityFile CAMINHO_DA_CHAVE_RSA_PRIVADA
StrictHostKeyChecking no
2) Digitar:
ssh-keyscan -H NOME_DO_SERVIDOR >> ~/.ssh/known_hosts
# no Computador DEV
ssh-add -K ~/.ssh/id_rsa
# no Computador Servidor (destino)
cat CHAVE_RSA_PUBLICA.pub >> ~/.ssh/authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment