Skip to content

Instantly share code, notes, and snippets.

@fchaussin
Last active April 14, 2021 11:36
Show Gist options
  • Save fchaussin/3ab378d28c792c47264b235882abce72 to your computer and use it in GitHub Desktop.
Save fchaussin/3ab378d28c792c47264b235882abce72 to your computer and use it in GitHub Desktop.
Copy SSH Key to Remote Linux Device

Generate an SSH Key

 ssh-keygen

then

ssh-copy-id -i ~/.ssh/id_rsa.pub user@host

or from windows powershell

type $env:USERPROFILE\.ssh\id_rsa.pub | ssh user@host "cat >> .ssh/authorized_keys"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment