Tools
Configure Public Key Authentication in Serv-U
Serv-U can use a different type of authentication method for SFTP and this is via Public key. The public key can be set up on the user profile and set the SSH authentication type.
First published date
Last published date
Overview
Serv-U MFT Server supports the powerful option to authenticate SFTP users using Public Key Authentication. This method of authentication allows users to connect using only a private key file along with a public key stored in Serv-U, and eliminates the need to remember a username and a password when logging in.
Public Key authentication is also a preferred authentication of some companies. Serv-U can also generate a key pair (public and private) and can also accept a key generated by a 3rd party tool like PuTTyGen and etc. The key pair format should (.pub) for the public key and (.key) for the private key.
Notes: It also supports LDAP authentication, but not Windows authentication.
Product section
Resolution
Creating public and private keys using Serv-U.
- Open Serv-U Management Console.
- Go to Domains > Users > Domain Users or Database Users
- Edit the user account which will authenticate via private key.
- In the User Information tab, click Manage Keys.
- Click Create Key if you want to generate it from Serv-U.
- A public key (with .pub extension) and private key (with .key extension, instead of .pub) will be created.
- Click Add Key if you already have the key or generated from another key generator or a public key that was provided by the client.
- Provide the Public Key to the end user.
- NOTE:
Creating public and private keys for users' SSH Authentication using PuTTyGen:
- Launch PuTTyGen
- Type of key to generate is RSA - with 2048 bit length
- Click on Generate to generate a public/private key pair (might take around 5 minutes to complete)
- Enter the password desired on the Key Passphrase field
- Click Save Public Key button > rename to filename.pub (.pub extension is important) ** to be used inside Serv-U > Domain > Users > edit user > Manage Keys field
- After saving the public key, next step is to save the private key file
- Click Key, then go to 'Parameters for saving key files...'
- Change the PPK file version from 3 to 2, then click OK.
- Click Save Private Key button > (file will already be in .ppk extension when saved) ** to be used on the FTP client (Filezilla, CuteFTP, WinSCP etc)
Configuring the SSH Authentication Type for the user account:
- Open Serv-U Management Console.
- Go to Domains > Users > Domain Users or Database Users
- Edit the user account which will authenticate via private key.
- Go to the Limits & Settings tab
- Change the Limit Type from 'Connection' to 'Password'
- Edit the 'SSH authentication type' entry and click YES to create a new limit
- Change the SSH authentication type from 'Password and Public Key' to 'Password or Public Key'.
- The option 'Public Key Only' can also be selected if the client requests to only use Public Key authentication.
- Save the changes
Notes:
- The default setting for the SSH Authentication Type is 'Password and Public Key'. User accounts will be able to login through SFTP with password only. Once a public key is uploaded through 'Manage Keys', this is the time that a Password AND Public Key will be required by Serv-U for the authentication process.
- If the public key is not created in Serv-U, make sure to have the .pub extension in the public key file name.
- Make sure to point to the actual public key file and not just the public key folder location for the 'Path' field when inside the Manage Keys page in the user profile.
- If you do not want to enter a passphrase when using the private key, do not enter a passphrase when generating a SSH key.
- The SSH keys generated with the help of this article is for authentication purposes ONLY. Not to be confused with the SSH server host keys within Serv-U.
- PuTTyGen is a 3rd-party tool and is not a SolarWinds product.
.