Setting Up SSH Access to a Remote Server Using Windows
To set up SSH access the following is required:
- Use PuttyGen to create the public/private keys
- Upload the public key to the remote server*
- Convert the .ppk file to RSA key pair file supported by OpenSSH
- Optionally, you can also use Pageant as an SSH Authentication agent.**
* ExpanDrive only supports OpenSSH files, instead of the .ppk files created by PuttyGen. When loading the public key to the remote server, ensure that you copy the public key suitable for pasting into the SSH authorized_keys file. Also, ensure that you load the private key into ExpanDrive in the format supported by OpenSSH.
**Pageant is useful if you will provide a passphrase for your private key: It removes the need to enter the passphrase each time that you want to use the private key.
Using PuttyGen to Create Public/Private Keys
You can use the Putty utility PuttyGen to create public/private key pairs.
To create the keys
- Open a new PuttyGen session
- You can keep the defaults and then click on Generate.
- Save the keys to your local machine, by clicking on “Save public key”, and “Save private key.”
Putty will prompt you to mouse over some grey space, in order to help create the randomly generated keys.
Note: You can also provide a passphrase to protect your private key, before saving the keys.
Uploading the public key to your SFTP server.
You need to copy the public key in the OpenSSH format for the authorized_keys file.
To copy the key and upload to the remote server
- At time of key generation, copy the public key from puttygen (see screenshot above)
- Log into the remote machine via Putty, using basic username and password authentication
- Run the following command
- Run the command that will contain the pasted public key as below:
where “paste key here” refers to the public key in OpenSSH format.
Converting the .PPK File
ExpanDrive only supports RSA key files that work with OpenSSH. For Windows, you will need to convert the generated .ppk file to the appropriate format.
To perform the conversion
- From Puttygen, click on File>Load Private Key.
- Click on Conversions>Export OpenSSH Key.
This is the key file that you will load into Expandrive to connect securely to the SFTP server. For this procedure click here.
Using Pageant to Manage SSH Keys on Windows
You can use Pageant to connect to an SFTP server via expanDrive without having to enter your passphrase
To use pageant
- Open a new pageant session.
- Press the ‘Add Key’ button. Pageant will bring up a file dialog, labelled ‘Select Private Key File’. Find your private key file in this dialog, and press ‘Open’.
Pageant will now load the private key. If the key is protected by a passphrase, Pageant will ask you to type the passphrase. When the key has been loaded, it will appear in the list in the Pageant window.
Now when you try to connect Expandrive to an SFTP server with pageant selected for authentication options, Expandrive will notice that pageant is running, retrieve the key automatically from Pageant, and use it to authenticate. This means you don’t have to provide your passphrase.