Skip to content

Instantly share code, notes, and snippets.

@sancau
Created February 9, 2023 14:45
Show Gist options
  • Save sancau/50715e4a7309ed1ca79ad8d487393ee9 to your computer and use it in GitHub Desktop.
Save sancau/50715e4a7309ed1ca79ad8d487393ee9 to your computer and use it in GitHub Desktop.
SSH copy key to remote (without any installed utils)
cat ~/.ssh/id_rsa.pub | ssh username@remote_host "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