Skip to content

Instantly share code, notes, and snippets.

@BananaAcid
Last active October 15, 2022 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BananaAcid/77fafb01bbac3360e0cecb266ef9285c to your computer and use it in GitHub Desktop.
Save BananaAcid/77fafb01bbac3360e0cecb266ef9285c to your computer and use it in GitHub Desktop.
# add user cert to root
ssh-keygen -t rsa
ssh root@server.tld "touch /root/.ssh/authorized_keys && chmod 600 /root/.ssh/authorized_keys"
cat ~/.ssh/id_rsa.pub | ssh root@server.tld "cat - >> /root/.ssh/authorized_keys"
# add user to dokku for git+push
cat ~/.ssh/id_rsa.pub | ssh root@server.tld "sudo sshcommand acl-add dokku $USER"
@BananaAcid
Copy link
Author

BananaAcid commented Oct 15, 2022

Alternative: ssh-copy-id -i ~/.ssh/id_rsa user@host

(if no -i -> all local keys are added, ref: https://www.ssh.com/academy/ssh/copy-id )

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