Created
October 30, 2017 15:49
-
-
Save gdellicarpini/8920794b367dfb536b724e159aaad9b6 to your computer and use it in GitHub Desktop.
SSH login without password (public-private key)
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
on server1 logged as root | |
root@server1: sudo su | |
root@server1: ssh-keygen -t RSA | |
root@server1: cd root/.ssh/ | |
//append server1's public key to server2's /root/.ssh/authorized_keys file | |
root@server1: ssh-copy-id -i id_rsa.pub root@server2 | |
Now you can log into server2 as root without password. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment