Skip to content

Instantly share code, notes, and snippets.

@fduran
Created February 20, 2012 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fduran/1870484 to your computer and use it in GitHub Desktop.
Save fduran/1870484 to your computer and use it in GitHub Desktop.
Linux Passwordless SSH
# ssh without passwords, useful for unattended automatic scp/rsync-over-ssh copies etc
# www.fduran.com
# Create public key without password in origin server:
ssh-keygen -t dsa
# if ssh target port is not 22, add it (ex: -p 2020) in ssh-copy-id after 'ssh':
# nano /usr/bin/ssh-copy-id
# Upload public key to remote target server:
ssh-copy-id -i /root/.ssh/id_dsa.pub remote_ip
# test:
ssh -p 2020 remote_ip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment