Created
August 21, 2014 11:52
-
-
Save nicon-dev/fbccb383100ec8d8543c to your computer and use it in GitHub Desktop.
SSH login without password
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
# First, on the local machine you will want to generate a secure SSH key: | |
ssh-keygen | |
# Walk through the key generator and set a password, the key file by default goes into ~/.ssh/id_rsa | |
# If you have named it differently, you have to add the private key manually: | |
ssh-add -K path/to/my_key | |
# Next, you need to copy the generated key to the remote server you want to setup passwordless logins with | |
# his is easily done with the following command string but you can use scp if you’d prefer | |
cat ~/.ssh/id_dsa.pub | ssh user@remotehost 'cat >> ~/.ssh/authorized_keys' | |
#Finally, confirm that you can now login to the remote SSH server without a password: | |
ssh user@remotehost.com | |
# source: | |
# http://osxdaily.com/2012/05/25/how-to-set-up-a-password-less-ssh-login/ | |
# https://help.github.com/articles/working-with-ssh-key-passphrases |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment