Skip to content

Instantly share code, notes, and snippets.

@a7madgamal
Last active January 1, 2016 07:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a7madgamal/8112389 to your computer and use it in GitHub Desktop.
Save a7madgamal/8112389 to your computer and use it in GitHub Desktop.
passwordless ssh connection
# 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
@halilim
Copy link

halilim commented Aug 28, 2014

You can do ssh-copy-id <remote> for the step 2.

@a7madgamal
Copy link
Author

good point, will update it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment