Skip to content

Instantly share code, notes, and snippets.

@joe32140
Last active December 14, 2019 22:08
Show Gist options
  • Select an option

  • Save joe32140/765d392b7f7ceb07726cd483468df9f1 to your computer and use it in GitHub Desktop.

Select an option

Save joe32140/765d392b7f7ceb07726cd483468df9f1 to your computer and use it in GitHub Desktop.
add ssh key to remote server

1. Make sure both ends have ssh key. If not, run:

ssh-keygen -t rsa

2. At local machine, run:

cat ~/.ssh/id_rsa.pub | ssh user@remotehost 'cat >> .ssh/authorized_keys'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment