SSH key authentication for Storage Boxes Print

  • ssh keys, Storage cloud snapshot
  • 5

If you use SCP, SFTP or rsync you can log in using SSH key pair authentication without entering a password.

Depending on the SSH port of the Backup account/Storage you use, you may need to use a specific format for the public SSH key. The following keys are supported:

ssh port : 22
key format : RFC4716
Algorithms: RSA, ECDSA, ED25519

ssh port : 23
key format : Standard OpenSSH Format
Algorithms: RSA, ECDSA, ED25519, ED25519-sk, ECDSA-sk

If you want to use the services over both ports, then you must store the public SSH key in both formats (RFC4716 and OpenSSH format) in the .ssh/authorized_keys file. Please note that a new line should be at the end of the file.

important : each user requires its own authorized_keys file in the user's directory.

Generating SSH keys

You can use ssh-keygen to generate a new pair of SSH keys:

server> ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/
The key fingerprint is:
cb:3c:a0:39:69:39:ec:35:d5:66:f3:c5:92:99:2f:e1 root@server
The key's randomart image is:
+--[ RSA 2048]----+
| |
| |
| |
| . = |
| . S = * o |
| . = = + + = |
| X o = E . |
| o + . . . |
| . |

Warning: With the default settings, using ssh-keygen will overwrite an existing SSH key! As an alternative, with the parameter -f, you can specify a different file path.

Depending on which SSH key format you have uploaded, you should be able to log in without a password on port 22 and/or 23:

Was this answer helpful?

« Back