I'm using putSFTP to transfer files from one server to another in an AWS stack.
I'm able to connect from one server to the other at the command line using sftp and specifying the host key(?) which is the public key I normally use to connect to the server.
I have tried a number of different combinations of settings in the putSFTP processor but I continue to get the error that auth failed.
Since I'm able to connect from the command line I know that I'm using the right key and that the server can reach the other server. So I'm at a loss. Not sure how to debug this? Any help greatly appreciated.
I have set the following configurations to match the information I use when I use sftp directly. :
Host=hostname of server
Username= username for login
Host key file= path and filename for the public key used
This is a copy of the error I receive:
2017-03-23 17:15:54,562 ERROR [Timer-Driven Process Thread-8] o.a.nifi.processors.standard.PutSFTP PutSFTP[id=fafae53e-015a-1000-03e0-f5f2bb961c95] Unable to transfer StandardFlowFileRecord[uuid=64c62269-a16e-4c67-9901-7fc5dd003355,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1490289354501-146, container=default, section=146], offset=0, length=2934225],offset=0,name=<asset name here>,size=2934225] to remote host <host goes here> due to java.io.IOException: Failed to obtain connection to remote host due to com.jcraft.jsch.JSchException: Auth fail: java.io.IOException: Failed to obtain connection to remote host due to com.jcraft.jsch.JSchException: Auth fail
2017-03-23 17:15:54,562 ERROR [Timer-Driven Process Thread-8] o.a.nifi.processors.standard.PutSFTP
java.io.IOException: Failed to obtain connection to remote host due to com.jcraft.jsch.JSchException: Auth fail
at org.apache.nifi.processors.standard.util.SFTPTransfer.getChannel(SFTPTransfer.java:447) ~[nifi-standard-processors-1.1.0.jar:1.1.0]
at org.apache.nifi.processors.standard.util.SFTPTransfer.getRemoteFileInfo(SFTPTransfer.java:491) ~[nifi-standard-processors-1.1.0.jar:1.1.0]
Sorry to hear you are having trouble with this.
Silly debugging questions:
* The key you are using in both scenarios is the same, correct? You don’t have both an RSA and DSA key with only one added to authorized_keys on the remote endpoint?
* The authorized_keys is not corrupt. Someone has reported being able to SSH with the key but not use JSch  (the underlying library making the connection here). Can you try re-copying the public key to the authorized_keys file?
* If neither of those work, you can enable more detailed logging for the component by adding a line in $NIFI_HOME/conf/logback.xml for "com.jcraft.jsch=DEBUG” and waiting 30 seconds for NiFi to pick up the changes.
signature.asc (859 bytes) Download Attachment
|Free forum by Nabble||Edit this page|