Created
April 17, 2009 10:19
-
-
Save meleyal/96956 to your computer and use it in GitHub Desktop.
SSH passwordless logins
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
# Create the .ssh directory if it's not already under ~/ | |
ssh user@server | |
mkdir .ssh | |
chmod 700 .ssh | |
exit | |
# Create a private/public key pair if you didn't already | |
ssh-keygen | |
# Copy your public key to the remote server | |
cat .ssh/id_rsa.pub | ssh user@server "cat >> .ssh/authorized_keys" | |
# You should now be able to login without a password prompt | |
ssh user@server | |
# If not, check the permissions again of ~/.ssh and ~/.ssh/authorized_keys | |
# Both should be set to 700 (rwx only by user) | |
# If it's still not working, check the permissions of your home directory (/home/user) | |
# It should be set to 755 (drwxr-xr-x) | |
# If for some reason you see a capital S in the permissions, chmod g-s should remove it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment