SSH login without password
How To Login To Your Ubuntu Server Without A Password
On the local machine
# defaults to /home/username/.ssh/id_rsa.pub
$ ssh-keygen
$ scp ~/.ssh/id_rsa.pub username@SERVER_ADDRESS:~/
Connect to the production machine
$ ssh username@SERVER_ADDRESS
On the production machine
# defaults to /home/username/.ssh/id_rsa.pub
$ cd ~
$ ssh-keygen
*Notice: Do not copy your local key (id_rsa.pub) into the ~/.ssh directory by accident *
$ cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
$ rm ~/id_rsa.pub
You might need to restart the ssh server
$ service sshd restart
Written by Shavit
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#