How to generate public key in the File Server using Stat
说明
Whenever Stat accesses file objects on a file server, Stat “logs in” using the username configured in Stat for that server. The file server then authenticates the user ID, typically with a password. For customers wanting a more secure method of authenticating user accounts on their SFTP file servers, Stat supports public key-based authentication.
原因
Stat can generate both, public and private keys. You can then export the public keys from Stat to the SFTP server. In this case, the private key is automatically stored in the Stat repository.
解决办法
Go to Maintenance | General | Object Types | select the file server and make the sure port is set to 22 using the public key auth type.
In the auth type column, click on the public key.
Select the key generation method. In this case, we are using RSA 2048.
Click on the Public Key Config button.
Click the generate button. By default, when generating a public key from Stat, Stat automatically adds the private key into the repository and gets encrypted. Therefore, there is no need to import a private key.
Export the public key that was generated in the View public key and appended it to the authorized_keys file in Unix.
其他信息
Stat 6.3.0 System Administration Guide - SFTP Public Key-Based Authentication