When configuring a file server using public key authentication doesn't work and raises error Auth Fails.
The current Jsch library that we use in Stat is out of date.
The issue has been identified by STAT-6255 by supporting OpenSSH private keys. It will be addressed in Stat 7.0 HF.
Workaround 1:
1.Use openssh binaries or puttyssh to create private keys. Mostly, these kinds of commands are run, for example:
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa
or (preferred)
ssh-keygen -t ecdsa -b 521 -f ~/.ssh/id_ecdsa
This generates keys in openssh format, which is not supported yet by Stat for SSH or SFTP.
Take a look at your private key header. It should start as
----- BEGIN OPENSSH PRIVATE KEY -----
2. Have to convert this key to pem format as below:
2a. Take a backup of the private key
2b. Run the following command
ssh-keygen -p -m pem -f <key_path>
3. Move the private key to the client machine and import it into the Stat client.
4. add the Public key to .ssh/authorized_keys directory in your Server
Workaround 2:
An alternative is possible to try the newer JSCH library by downloading the attachment and following the instructions below.
1. Go to <STAT_HOME>\app\modules\com\jcraft\main, take a backup of jsch-0.1.55.jar and move it somewhere outside of the STAT_HOME.
2. Put the newer attached jsch library jsch-0.1.55.jar. in the same path (for easier application the name has been renamed as the same).
3. Bounce the SCA after deleting the cache directories (data, log, and tmp).