Skip to content

Instantly share code, notes, and snippets.

@ThinhPhan
Last active February 28, 2023 08:10
Show Gist options
  • Save ThinhPhan/7a5ca4abe5749591e69698660d73ce60 to your computer and use it in GitHub Desktop.
Save ThinhPhan/7a5ca4abe5749591e69698660d73ce60 to your computer and use it in GitHub Desktop.
Copy SSH Key to Remote Server

SSH to Remote Server without input password

Add your SSH key into the server, then next time you don't have to input password when ssh

  • Option 1 cat-ing the file to authorized_keys:

cat id_rsa.pub | ssh username@hostname ' cat >>.ssh/authorized_keys'

Copy your keys to the target server:

$ ssh-copy-id id@server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment