Skip to content

Instantly share code, notes, and snippets.

@xterat
Last active July 9, 2017 11:23
Show Gist options
  • Save xterat/9a9224ecac4f82b897f1b69c37e81e36 to your computer and use it in GitHub Desktop.
Save xterat/9a9224ecac4f82b897f1b69c37e81e36 to your computer and use it in GitHub Desktop.

ssh without password

In client side, make sure current directory is ~/:

  1. generate public key & private key
ssh-keygen -t rsa
  1. make ~/.ssh directory in server side
ssh b@B mkdir -p .ssh
  1. add client's public key to server's authorized keys
cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment