SSH Connection failed -> Permission denied

Hello,

i’m trying to connect to a server using the “SSH Connection” Node and filled all needed entries. By clicking “test connection” i got the information that the permission is denied.

My KNIME Log looks like this…

2018-12-11 10:01:17,781 : WARN : SwingWorker-pool-6-thread-3 : TestConnectionDialog$TestWorker : SSH Connection : 2:1 : Couldn’t connect
2018-12-11 10:01:17,782 : DEBUG : SwingWorker-pool-6-thread-3 : TestConnectionDialog$TestWorker : SSH Connection : 2:1 : Couldn’t connect
3: Permission denied
at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1633)
at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1553)
at org.knime.base.filehandling.remote.files.SFTPRemoteFile.getLsEntry(SFTPRemoteFile.java:667)
at org.knime.base.filehandling.remote.files.SFTPRemoteFile.internalExists(SFTPRemoteFile.java:277)
at org.knime.base.filehandling.remote.files.SFTPRemoteFile.exists(SFTPRemoteFile.java:265)
at org.knime.base.filehandling.remote.connectioninformation.node.TestConnectionDialog$TestWorker.doInBackgroundWithContext(TestConnectionDialog.java:238)
at org.knime.base.filehandling.remote.connectioninformation.node.TestConnectionDialog$TestWorker.doInBackgroundWithContext(TestConnectionDialog.java:1)
at org.knime.core.util.SwingWorkerWithContext.doInBackground(SwingWorkerWithContext.java:106)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Any suggeestion to solve this problem?

Greets
Christopher

Hello @armingrudd,

still having the problem.
I have tried to connect to the server via other FTP-Programs and the connection is okay.
I don´t know how to solve the problem via the SSH-Connection.

Through another tool, can you SSH in and provide the output of the ls -la ?

I’ve seen similar issues with other tools, where they issue commands on connect to verify the connection, and perhaps one of those post connection commands is failing. ]

Do you have access to see the logs on the server? Sometime the dmesg output, or the sssd logs can tell us what is happening.

-Jeff

Hello @jeffgullick-knime,

i´ve tried it with another tool and it works. I can see alle the files. Only in KNIME I get the message “Permissin denied” by trying a Test connection.

How can I see the logs on the server with KNIME?

Thanks and Best regards
Christopher

Hi Christopher!

What server are you trying to connect? Have you tried it with FTP Connection node maybe?

Br,
Ivan

Hi Ivan,

it´s an SFTP server which I am trying to connect. The Host-Name makes me a little bit mistrustful, because it begins with “ftps-…”.

I have tried it already with the FTP-Connection node and there I get the message “failed null”.

Best regards
Christopher

Hi!

I see now you wrote you can connect with other tool. Which protocol are you using in these tools? SSH?

You can not see it with KNIME as you can not connect. See the logs with other tool.

Br,
Ivan

Yes I´m using the SSH protocol in the other tool.

Any suggestion?

Ok. It is SSH.
Same suggestion as above. Find logs and see what is happening :wink:

Br,
Ivan

I only see the “quick-log” from Filezilla where the connection works without any problem.

The server is from another partner where I can pick up customer-informations. From my point of view I can´t see any other logs that are more detailed.

Hi Christopher!

Not sure how to proceed on this one then… Maybe try to see it with your partner?

Br,
Ivan

Hello,

i’m trying to connect to a SFTP-Server using the “SSH Connection” Node and filled all needed entries. By clicking “test connection” i got the information that the permission is denied.

I have already called our business partner to clear that there is no firewall or any other modul that possibly block our connection. I tried to connect with another sofware (FileZilla) and there it works fine. So now i dont know what could be the problem for the connection failure.

My KNIME Log looks like this…
2019-07-15 11:10:57,675 : WARN : SwingWorker-pool-5-thread-1 : : TestConnectionDialog$TestWorker : SSH Connection : 0:1547 : Couldn’t connect
3: Permission denied.
at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225)
at com.jcraft.jsch.ChannelSftp.cd(ChannelSftp.java:343)
at org.knime.base.filehandling.remote.files.SFTPRemoteFile.getLsEntry(SFTPRemoteFile.java:693)
at org.knime.base.filehandling.remote.files.SFTPRemoteFile.internalExists(SFTPRemoteFile.java:282)
at org.knime.base.filehandling.remote.files.SFTPRemoteFile.exists(SFTPRemoteFile.java:270)
at org.knime.base.filehandling.remote.connectioninformation.node.TestConnectionDialog$TestWorker.doInBackgroundWithContext(TestConnectionDialog.java:238)
at org.knime.base.filehandling.remote.connectioninformation.node.TestConnectionDialog$TestWorker.doInBackgroundWithContext(TestConnectionDialog.java:1)
at org.knime.core.util.SwingWorkerWithContext.doInBackground(SwingWorkerWithContext.java:106)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Any suggeestion to solve this problem? Is it possible that Java causes the problem?

Greets
Christopher

Hi @Christopher_Lozano

Without knowing your exact ssh setup I can only do some guessing.

Internally the Test Connection tries to check whether the root “/” exists. It seems that you don’t have read access to that. You should however still be able to execute the node.

The browsing functionality in the Filehandling nodes will probably also be restricted, since it builds the tree from the root ("/"). You can try entering a path of which you know that you have read access to, and then open the Browse dialog. That might work. Like this:

Do you have read access to the root level when using a graphical tool such as FileZilla?

2 Likes

Hi @oole

I don´t know how but after executing the SSH-Node with the login data i got a green status for the node. In the Test connection it is still saying “Permission denied”. However…i connect a List-Remote-File-Node an execute it too (with the entire path where the readable data is on the sftp-server".

Surprise…I got all the File-Names listed in there.

Now i have antoger question. Is there any possibility to read a csv directly in the remote connection to the sftp-server or do i have to downlod the data first before?

Thanks and best regards
Christopher

1 Like

Glad to hear that.

The simplest would be to download the file to a temporary directory and then read it from there, as in this workflow.

image

1 Like