Skip to content

Instantly share code, notes, and snippets.

@memandip
Created January 20, 2021 09:37
Show Gist options
  • Save memandip/4bf8753b89e71518a27dc7837f5be792 to your computer and use it in GitHub Desktop.
Save memandip/4bf8753b89e71518a27dc7837f5be792 to your computer and use it in GitHub Desktop.
add ssh key to remote server from terminal
ssh remote_user@remote_ip "echo "$(cat ~/.ssh/id_rsa.pub)" >> ~/.ssh/authorized_keys"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment