Last active
September 10, 2017 20:50
-
-
Save petriichuk/b21b5ca0cdaaf287ab3699cc2c253efc to your computer and use it in GitHub Desktop.
Copy ssh keys to remote server
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 [email protected] | |
adduser sammy | |
usermod -aG sudo sammy | |
#onLocal | |
cat ~/.ssh/id_rsa.pub | |
#onRemote | |
su - sammy | |
mkdir ~/.ssh | |
chmod 700 ~/.ssh | |
nano ~/.ssh/authorized_keys #paste key | |
chmod 600 ~/.ssh/authorized_keys | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment