SSH keys provide a more secure way of logging into your FTP Today account with SFTP than using a password alone. While a password can eventually be cracked with a brute force attack, SSH keys are nearly impossible to decipher by brute force alone. Generating a key pair provides you with two long string of characters: a public and a private key. You can place the public key on your FTP Today account, and then login by connecting to it with a client that already has the private key. When the two match up, the system logs you in without the need for a password.
Step One - Create the RSA Key Pair
The first step is to create the key pair on the client machine (there is a good chance that this will just be your computer):
ssh-keygen -t rsa
Step Two - Store the Keys and Passphrase
Once you have entered the Gen Key command, you will get a few more questions:
Enter file in which to save the key (/home/demo/.ssh/id_rsa):
You can press enter here, saving the file to the user home (in this case, my example user is called demo).
Enter passphrase (empty for no passphrase):
FTP Today suggests that you do not use a passphrase. Doing so will require you to enter the passphrase each time you wish to login. To leave the passphrase blank just hit enter.
The entire key generation process looks like this:
The public key is now located in /home/demo/.ssh/id_rsa.pub The private key (identification) is now located in /home/demo/.ssh/id_rsa
Step Three - Copy the Public Key
Log into your sites administration.
Click the “Users” tab.
Click on the magnifying glass next to the user you want to add the key to.
Click the SSH Key icon.
On the SSH Keys window do the following:
-Give the key a name.
-Paste the contents of the public key into the SSH Key section.
-Click the OK button to add the key.
Now you have completed adding a SSH key to a user.