Last active
January 1, 2016 07:29
-
-
Save a7madgamal/8112389 to your computer and use it in GitHub Desktop.
passwordless ssh connection
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
# step 1: on local machine | |
# (for first time only!) | |
ssh-keygen -t rsa | |
#copy the result exactly | |
cat ~/.ssh/id_rsa.pub | |
# step 2:on remote machine | |
ssh-copy-id <remote> | |
#NOTE:on centos you need to run this command on the remote server: | |
chmod 0600 /root/.ssh/authorized_keys |
good point, will update it :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can do
ssh-copy-id <remote>
for the step 2.