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 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 to the user account
1. Login into your site as a Site Administrator.
2. Go to the User section and select the user from the list you want to add the key to.
3. Click the SSH tab.
4. Click the Add SSH Key button.
5. Fill out the SSH Key Name and paste the key into the SSH key section.
6. Click the Save text to save this key.