
Linux Passwordless SSH
By:
fduran on
Apr 21st, 2011 | syntax:
Bash | size: 0.41 KB | hits: 752 | expires: Never
# 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