To enable public key user authentication, the user should create a user-key pair that consists of a public key and a key. When public key authentication is performed, the user signature is created by Xshell with the key, and the SSH server uses the public key to confirm its signature.
Both the SSH server and the Xshell can create a user key, such as creating a key on the server, and the user is required to register the key to the Xshell key save location using Xshell's import function. If you create a key on Xshell, the user should register the public key with the server.
First, how to create a user key:
On the Tools menu, select the User Key Generation Wizard.
Follow the prompts of the user Key Generation Wizard to create the user secret key. To obtain a product key, you can refer to: How to register to activate Xshell
Note: The public key can be registered to the server at the last stage of generating the key. The registration method differs depending on the type of server.
SSH1: Copy the public key to the $home/.ssh/authorized_keys file. The following instructions are executed for deleting settings file and directory write permissions.
$ cd
$ chmod go-w. . ssh. Ssh/authorized_keys
The SSH2-OPENSSH:OPENSSH server uses this format. Copy the public key to the $home/.ssh/authorized_keys2 file. The following instructions are executed for deleting settings file and directory write permissions.
$ cd
$ chmod go-w. . ssh. ssh/authorized_keys2
· SSH2-IETF secsh: A server like ssh.com, several commonly used SSH servers use this format. Copy to the $HOME/.SSH2 directory, such as Mypublickey.pub, after saving the public key with an intrinsic name. Add the following line to the $home/.ssh2/authorization file:
Key mypublickey.pub
The following instructions are executed for deleting settings file and directory write permissions.
$ cd
$ chmod go-w. . ssh2
$ chmod go-w. Ssh2/authorization. ssh2/mypublickey.pub
Second, how to register the public key on the server:
On the Tools menu, select User Key Manager to open the User Key dialog box.
1. Select the user key that you wish to register.
3. Click [Properties] and the User Key Properties dialog box appears.
4. Click the [Public Key] tab.
5. Select the applicable type in the [public key type] directory.
6. Click Save as file to save or copy the contents of the key after registering to the server according to the above public key registration method.
Xshell Tutorial: http://www.xshellcn.com/support.html
Teach you Xshell how to use public key user authentication