1 KiB
1 KiB
creation date | tags | |||||
---|---|---|---|---|---|---|
2022-01-08 |
|
See https://docs.hetzner.com/robot/storage-box/backup-space-ssh-keys.
Add existing keys or convert format to RFC
Use both mechanisms (RFC and standard) for maximum compatibility.
Example how .ssh/authorized_keys
might look:
ssh-rsa AA.... user@host
---- BEGIN SSH2 PUBLIC KEY ----
Comment: "2048-bit RSA, converted by user@host from OpenSSH"
AA.....
---- END SSH2 PUBLIC KEY ----
Create a compatible ssh key and transfer to the user
ssh-keygen-rsa id_rsa
ssh-keygen -e -f .ssh/id_rsa.pub | grep -v "Comment:" > .ssh/id_rsa_rfc.pub
cat .ssh/id_rsa.pub >> storagebox_authorized_keys
cat .ssh/id_rsa_rfc.pub >> storagebox_authorized_keys
echo -e "mkdir .ssh \n chmod 700 .ssh \n put storagebox_authorized_keys .ssh/authorized_keys \n chmod 600 .ssh/authorized_keys" | sftp ...@....your-storagebox.de