Sunday, June 16, 2013

Setting SSH public-key login in 5 seconds

Local (the computer to log in from):
ssh-keygen -t dsa

Remote (the computer to log in):
cat ~/.ssh/id_dsa.pub | ssh -l REMOTE_USER REMOTE_SERVER 'cat >> ~/.ssh/authorized_keys'


That's it!