How to Generate a SSH Keypair for SFTP and Log into SolarWinds Serv-U using Public Keys

Serv-U is a FTP Server product by SolarWinds that supports FTPS, SFTP, FTP and HTTPS transfers for both Linux and Windows. It is flexibile and can join onto Active Directory Domains and Shares which is why it is a nice and useful commercial FTP solution.

More information on Serv-U can be found at: http://www.serv-u.com/

For our tutorial, we will be creating a SSH keypair on a server, and storing the public keys on Serv-U to allow SFTP authentication.

Prerequisites

  • Linux or Windows server for SSH Keypair Generation
  • Serv-U for Windows
  • SFTP client, our case we will be using SolarWinds FTP Voyager
  • Note: This only works for local users in Serv-U, You cannot use LDAP/AD authentication

1a. Generate SSH Keypair on Linux

  • Make sure openssl package is installed on Linux server
  • Open a terminal windows and enter in ssh-keygen -t rsa
  • This command generates two SSH key files, id_dsa and id_dsa.pub, in the directory home/username/.ssh, where username is your user name.
  • Copy the files to your local computer and rename to sftp.key and sftp.pub for the private and public keys

1b. Generate SSH Keypair on Windows

  • Download PuTTYgen.exe and run it
  • Select the SSH-2 RSA radio button in the Parameters section near the bottom of the page.

SNP_3071028_en_v0

 

  • Click the Generate button.
  • Move the mouse around in the blank area as instructed, until PuTTYgen generates the key pair.

SNP_3071031_en_v0

  • Click the Save public key button and save the public key with the name sftp.pub in the folder C:\Documents and Settings\username\.ssh, where username is your Windows user name.
  • Click Conversion > Export OpenSSH Key and save the private key file as a sftp.key file

 

2. Enable SSH Public SSH Key Authentication for A Local User

  • In Serv-U go to Domains > Users and right click a user you would like to allow SSH Key Access
  • Right Click the user and select Edit. Go to Limits & Settings > SSH Authentication Type > Password or Public Key (You can also just use Public Key)servu1

 

3. Install the Public Key onto Serv-U Account

  • Copy your sftp.pub key onto the Serv-U server to a folder of your choice
  • For the User in SSH Keys > Manage Keys. Add the sftp.pub key created in previous steps

servu2

 4. Use SFTP Client and Add Private and Public Keys

  • Create a New Connection and use SFTP as the login
  • In SSH Options, select your public and private keys and select use public key authentication
  • Once completed, click ok and connect and you should be able to login

ftpvoy

 

Leave a Comment