Last active
December 16, 2015 11:39
-
-
Save baijian/5428853 to your computer and use it in GitHub Desktop.
when want to login without password, pay attention to the authority of directory and file
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
>client | |
ssh-keygen,一直Enter,得到一对rsa的公钥私钥对. | |
scp id_rsa.pub user@server.com:~/ | |
>server | |
确保/root权限为750 | |
mkdir .ssh | |
chmod 700 .ssh | |
cd .ssh | |
touch authorized_keys | |
chmod 600 authorized_keys | |
cat ~/id_rsa.pub >> ~/.ssh/authorized_keys | |
done. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment