Skip to content

Instantly share code, notes, and snippets.

@baijian
Last active December 16, 2015 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baijian/5428853 to your computer and use it in GitHub Desktop.
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
>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