Skip to content

Instantly share code, notes, and snippets.

@daronwolff
Last active March 1, 2017 21:20
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 daronwolff/9da654f587ab347b243785762134a6c2 to your computer and use it in GitHub Desktop.
Save daronwolff/9da654f587ab347b243785762134a6c2 to your computer and use it in GitHub Desktop.
Create and send ssh key. Ubuntu 16
ssh-keygen -t rsa
echo "alias myserver='ssh myuser@192.168.0.1'" >> $HOME/.bashrc
cat $HOME/.ssh/id_rsa.pub | ssh myuser@192.168.0.1 'cat >> .ssh/authorized_keys'
source $HOME/.bashrc
myserver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment