When running an RA FTP Job, it may fail with the error "SSH_MSG_DISCONNECT: 2 Too many authentication failures"
The output file may have the below snippets:
****************************************** Start of job log ******************************************
Using SFTP private key file: ~/.ssh/id_ecdsa
Authentications that can continue: publickey
Next authentication method: publickey
PubkeyAcceptedAlgorithms = ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss
PubkeyAcceptedAlgorithms in server-sig-algs = [ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, rsa-sha2-512, rsa-sha2-256, ssh-rsa, ssh-dss]
ecdsa-sha2-nistp521 preauth failure
Disconnecting from remote server hostname port 22
Connection attempt failed: SSH_MSG_DISCONNECT: 2 Too many authentication failures
ErrorMsg: Internal Error: 1
Details: SSH_MSG_DISCONNECT: 2 Too many authentication failures
com.uc4.ftpjob.DataTransferException: Connection exception.
at com.uc4.transfer.CITSFTPImpl.<init>(CITSFTPImpl.java:178)
at com.uc4.ftpjob.connections.ConnectionManager$1.run(ConnectionManager.java:87)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: com.jcraft.jsch.JSchSessionDisconnectException: SSH_MSG_DISCONNECT: 2 Too many authentication failures
at com.jcraft.jsch.Session.read(Session.java:1316)
at com.jcraft.jsch.UserAuthPassword.start(UserAuthPassword.java:88)
at com.jcraft.jsch.Session.connect(Session.java:479)
at com.jcraft.jsch.Session.connect(Session.java:198)
at com.uc4.transfer.CITSFTPImpl.connect(CITSFTPImpl.java:232)
at com.uc4.transfer.CITSFTPImpl.openChannel(CITSFTPImpl.java:220)
at com.uc4.transfer.CITSFTPImpl.retryOpenChannel(CITSFTPImpl.java:193)
at com.uc4.transfer.CITSFTPImpl.<init>(CITSFTPImpl.java:164)
... 2 more
******************************************* End of job log *******************************************
The important points are in bold.
Using SFTP private key file: ~/.ssh/id_ecdsa --> This line shows that the RA FTP Job's Login object is using a private key for connection authentication
Authentications that can continue: publickey
Next authentication method: publickey --> These two lines shows that the RA FTP Job is now checking it's define private key with the remote host's public key. As seen a few lines down, this connection method fails with the message "preauth failure" resulting in the Job failing to connect and end with error "SSH_MSG_DISCONNECT: 2 Too many authentication failures".