Skip to content

Instantly share code, notes, and snippets.

@tonylea
Created August 22, 2021 18:25
Show Gist options
  • Save tonylea/67bb2c61d8439d15f07ba0940766a7e9 to your computer and use it in GitHub Desktop.
Save tonylea/67bb2c61d8439d15f07ba0940766a7e9 to your computer and use it in GitHub Desktop.
Copy ssh key to server
cat ~/.ssh/id_rsa.pub | ssh <USER_NAME>@<SERVER_NAME> "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment