Skip to content

Instantly share code, notes, and snippets.

@faridlab
Created July 24, 2019 10:58
Show Gist options
  • Save faridlab/4219a69a682690b3097bce1e00839f48 to your computer and use it in GitHub Desktop.
Save faridlab/4219a69a682690b3097bce1e00839f48 to your computer and use it in GitHub Desktop.
An alternative way to install public key in the remote machine's authorized_keys
cat ~/.ssh/id_rsa.pub | ssh USER@HOST "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment