Hello!

(Using 2.8.0 sshd-core and sshd-scp modules)

My goal is to have a java-class (TestScpClient) which is instantiated every time a list of files (stored in FileCommon with fields for both relative filepath and filename for a local file is defined) is to be transferred. The client should connect to a normal remote OpenSSH-server and then transfer the list of files to the remote location.

The TestScpClient has a general timeout of 300 seconds, but despite this, when I use the object immediately after instantiating it, the first transfer fails because, according to logs, the session has expired:

Channel id=0 not registered because session is being closed: ChannelExec[id=0, recipient=-1]-ClientSessionImpl

This is also verified as the scpClient.getClientSession().isOpen() returns false.

The SshClient-portion does seem to work as it should, using public key authentication, and this is verified by looking at the sshd-logs on the remote server:

pam_unix(sshd:session): session opened for user xxx(uid=1234) by (uid=0)
pam_unix(sshd:session): session closed for user xxx

I've also added a session heartbeat, with 10s period, to the session, but to no avail.

Those few examples of scp client code that I could find on the net do not seem to define anything beyond what I have in my code, neither does the mina-sshd (SCP) documentation.

The whole class can be found here: https://zerobin.net/?891d1804e2fcf97a#T8UNjStq5ZNXiBOo5KA1aKIWHh47h+6if76eq/SpTvI=

I am new to mina-sshd so I have probably missed something obvious.

With regards,

Poltsi

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@mina.apache.org
For additional commands, e-mail: users-h...@mina.apache.org

Reply via email to