Skip to content

Instantly share code, notes, and snippets.

@posilva
Created March 2, 2021 11:17
Show Gist options
  • Save posilva/113321f7ede60f54fb77cca8fcf9a88f to your computer and use it in GitHub Desktop.
Save posilva/113321f7ede60f54fb77cca8fcf9a88f to your computer and use it in GitHub Desktop.
Add pub key to remote host from Pem
ssh-keygen -f my_key.pem -y | 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