Last active
December 31, 2015 08:09
-
-
Save rafaelrozon/ccc9e526103382bf5c1a to your computer and use it in GitHub Desktop.
ssh without password
This file contains hidden or 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
ssh-keygen -t rsa | |
ssh user@host mkdir -p .ssh | |
cat .ssh/id_rsa.pub | ssh user@host 'cat >> .ssh/authorized_keys' | |
ssh user@host 'chmod 700 .ssh; chmod 640 .ssh/authorized_keys' | |
ssh user@host | |
the user to authenticated needs to be owner of the authorized_keys file. Change it with | |
sudo chown user authorized_keys | |
boom, done! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment