How to generate SSH key and establish SSH connection to a server on hosts like SiteGround:
- Open Puttygen, make sure RSA is selected from the Parameters section, then click Generate to generate a new key pair.
- Move mouse over the blank area to generate randomness to create the key.
- When key is generated, give it a comment and then a passphrase (password). Then save the public key and private key to two files using the respective buttons.
- Go to SiteGround (or other host) user interface, under Dev > SSH Keys Manager, select Import.
- Write something recognizable for Key Name, and then copy the public key from inside Puttygen, from the area at the top that says “Public key for pasting into OpenSSH authorized_keys file”.
- Click Import and you should have the public key imported into the server now. Click the options next to the key and select SSH Credentials.
- Open Putty and enter the credentials:
- In the Session menu, enter Hostname and Port.
- In the SSH > Auth menu, enter the path to the private key you saved earlier.
- In the Connection > Data menu, enter the “Auto-login username” from the SiteGround SSH Credentials.
- In the Session menu, in Saved Sessions, enter a recognizable name for this saved connection. Then click Save.
- Click Load and you will be prompted to enter the private key passphrase (password). The very first time you connect, Putty will alert you you’re connecting to a new server and if you are sure this is the right server, you can select to trust it in the future.
If you want to use FTP, currently Cyberduck seems like a good FTP client. You can open a new connection in the client and select the SFTP protocol (SSH File Transfer Protocol) – this is important for security as other protocols aren’t necessarily encrypted. Then add all SSH connection details from above. You can bookmark the connection so it’ll remember it.