An FTP job which uses SFTP key authentication is failing with the following exception in the job report:
Connection attempt failed: Auth cancel for methods 'publickey,password'
Error creating connection.: com.automic.agent.ftp.exceptions.DataTransferException: Error creating connection.
at com.automic.agent.ftp.connections.ConnectionManager._createConnection(ConnectionManager.java:109)
at com.automic.agent.ftp.connections.ConnectionManager.createConnection(ConnectionManager.java:41)
at com.automic.agent.ftp.commands.CommandProcessor.createInitialConnections(CommandProcessor.java:206)
at com.automic.agent.ftp.commands.CommandProcessor.execCommand(CommandProcessor.java:312)
at com.automic.agent.ftp.commands.CommandProcessor.processCommands(CommandProcessor.java:177)
at com.automic.agent.ftp.jobs.FtpJob.runJob(FtpJob.java:79)
at com.automic.ra.agent.RaJobProcessorImpl.execute(RaJobProcessorImpl.java:93)
at com.uc4.ex.Job.run(Job.java:463)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: com.automic.agent.ftp.exceptions.DataTransferException: Connection exception.
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:205)
at com.automic.agent.ftp.connections.ConnectionManager._createConnection(ConnectionManager.java:101)
... 12 more
Caused by: java.lang.RuntimeException: com.automic.agent.ftp.exceptions.DataTransferException: Connection exception.
at com.automic.agent.ftp.connections.ConnectionManager.lambda$_createConnection$0(ConnectionManager.java:95)
... 4 more
Caused by: com.automic.agent.ftp.exceptions.DataTransferException: Connection exception.
at com.automic.agent.ftp.transfer.CITSFTPImpl.<init>(CITSFTPImpl.java:93)
at com.automic.agent.ftp.connections.ConnectionManager.lambda$_createConnection$0(ConnectionManager.java:66)
... 4 more
Caused by: com.jcraft.jsch.JSchException: Auth cancel for methods 'publickey,password'
at com.jcraft.jsch.Session.connect(Session.java:520)
at com.jcraft.jsch.Session.connect(Session.java:198)
at com.automic.agent.ftp.transfer.CITSFTPImpl.connect(CITSFTPImpl.java:148)
at com.automic.agent.ftp.transfer.CITSFTPImpl.openChannel(CITSFTPImpl.java:137)
at com.automic.agent.ftp.transfer.CITSFTPImpl.retryOpenChannel(CITSFTPImpl.java:108)
at com.automic.agent.ftp.transfer.CITSFTPImpl.<init>(CITSFTPImpl.java:79)
... 5 more
com.automic.agent.ftp.exceptions.AbortJobException: Job aborted.
The exceptions can be different on other SFTP servers, i.e.
java.lang.RuntimeException:java.lang.RuntimeException:com.jcraft.jsch.JSchException:invalid privatekey.
Integration FTP 21.X, 24.X
Configuration.
The key was created with the command mentioned in the documentation:
ssh-keygen -t dsa
This does not work if the ssh version is ≥ 8.2
The key needs to be created with this command:
ssh-keygen -t ed25519