Hi,

I'm using sshd both for a custom client and a server and faced some
problems. I use 0.14.0, but from what I've seen in source code, it
looks like the same applies to 1.0.0 as well.

I found that `ClientSession.createSftpClient()` hangs forever at least
in two cases:
- when 'sftp' subsystem is not available on server. In that case it
hangs on line `this.channel.open().await()` in constructor.
- when subsystem implementation throws an IOException in
`org.apache.ssh.server.Command#start`. In that case client hangs in
`DefaultSftpClient.init()`, desperately waiting for a message.

I understand that I can initialise DefaultSftpClient in a separate
thread and interrupt it if necessary, but probably I am missing
something and there is another solution?

Also, what is the proper way to disconnect a client in case of an
error in my `org.apache.ssh.server.Command#start` implementation?
Simply throwing an IOException helps with some sftp clients, but
doesn't help with clients written on apache sshd – maybe because
`org.apache.sshd.client.channel.ChannelSubsystem#doOpen` sends
`wantReply` as false.

Thanks,
Ivan

Reply via email to