Created
April 28, 2019 14:16
-
-
Save drunkensouljah/066a6a3a4cebde9243bb38d337aec7bd to your computer and use it in GitHub Desktop.
[Copy ssh key] Copy ssh key to server #shell #terminal
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
| 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