Created
February 7, 2017 20:16
-
-
Save fabiocruzcoelho/6bf25e2fd08fbdaace28f187eb2f25b6 to your computer and use it in GitHub Desktop.
Comando para Gerar chaves SSH
This file contains 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
# Comando para gerar chave por usuario | |
ssh-keygen -t rsa -b 2048 -v -f keyname | |
# Comando para copia entre o servidores | |
ssh-copy-id -i keyname.pub username@servidor.exemplo.local | |
# Sincroniza aruivos sem pedir senha | |
rsync -avz -e "ssh -i /homeuser/.ssh/keyname" username@servidor_ou_ip:/origem/ /destino | |
# Sincroniza arquivos excluindo tudo que iniciar com . (Arquivos ocultos) sem pedir senha | |
rsync -avz --delete --exclude=".*" -e "ssh -i /homeuser/.ssh/keyname" /origem/ username@ip_servidor:/destino |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment