Skip to content

Instantly share code, notes, and snippets.

@drunkensouljah
Created April 28, 2019 14:16
Show Gist options
  • Select an option

  • Save drunkensouljah/066a6a3a4cebde9243bb38d337aec7bd to your computer and use it in GitHub Desktop.

Select an option

Save drunkensouljah/066a6a3a4cebde9243bb38d337aec7bd to your computer and use it in GitHub Desktop.
[Copy ssh key] Copy ssh key to server #shell #terminal
cat ~/.ssh/id_rsa.pub | ssh <user>@<hostname> 'cat >> .ssh/authorized_keys && echo "Key copied"'
# ALTERNATIVE
ssh-copy-id "[email protected] -p <port-number>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment