Last active
October 15, 2022 23:51
-
-
Save BananaAcid/77fafb01bbac3360e0cecb266ef9285c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 )