KB Article #186420

"Bad return value from PasswordAuthentication" for SFTP Server with double authentication with B2Bi 2024-01

Problem

Connection between B2Bi SFTP Delivery Exchange and remote SFTP server is not working.

- The SFTP server order is "publickey, password", we can see the configuration under "/etc/ssh/sshd_config" :
Match User sftp_user_axway
PubkeyAuthentication yes
PasswordAuthentication yes
AuthenticationMethods publickey,password

- But B2Bi goes with "password, publickey".
In "/Interchange/logs/<hostname>_te.log" is :
2024-03-13 16:48:08,481 - ERROR [Worker47-4235] (ProducerTask) - Error producing message ci1710344588118.324914@<hostname>_te, ExchangePointId:
61245, URL: sftp://212.01.123.12:2244/folder01, Name: PD_sftp_REMOTE
com.cyclonecommerce.tradingengine.transport.UnableToAuthenticateException: Bad return value from PasswordAuthentication. Return value = FAILED. SSH Host: 212.01.123.12 port: 2244


Resolution

With B2Bi 2024-01 by default, "sshd.auth.methods.order.enable" = "false".
To enable the authentication methods order established by the SSH server, it is required to set it to "true".

1) Connect to "https://<hostname>:6443/ui/core/SystemProperties#"
2) Click on "Show default system properties"
3) Add "sshd.auth.methods.order.enable" and set it to "true"