Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setting up keyauth fast
  • On each remote server:
mkdir -p ~/.ssh; touch ~/.ssh/authorized_keys; chmod -R 700 ~/.ssh;
cat .ssh/id_rsa.pub | ssh username@host "cat >> ~/.ssh/authorized_keys"

TODO: See if this works

ssh-copy-id 'user@remotehost' # Automatically installs your public key to the remote host (this is included in the openssh package)

From cli-magic

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