Created
September 15, 2017 01:25
-
-
Save trydofor/ad4328a8ff6ac0e9c4fa1f03c7383b80 to your computer and use it in GitHub Desktop.
ssh auto login
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
#!/bin/bash | |
cat << EOF | |
#On Client: | |
[ -d ~/.ssh ] || mkdir .ssh | |
[ -f ~/.ssh/id_rsa.pub ] || ssh-keygen -t rsa | |
cat ~/.ssh/id_rsa.pub | |
# On Server | |
[ -d ~/.ssh ] || mkdir .ssh | |
cat >>~/.ssh/authorized_keys <<END | |
the id_rsa.pub on client | |
END | |
EOF | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment