This project is read-only.

Still connected after using disconnect

Feb 21, 2012 at 6:04 PM

Hi,

I have tried this on two sftp servers.

FreeSSHd and Cute FTP mini-sftp-server, on both, after using the disconnect method, the user still appears as connected to the server.

The sample code I used does nothing more than, Connecting, waiting 10s, and Disconnecting.

It may have something to do with this thread: http://sshnet.codeplex.com/discussions/287998,

Do you have any idea of what could cause such behavior ?

Thank you very much!

Coordinator
Feb 22, 2012 at 2:48 PM

Hi,

 

I guess I would have to see this behaviour myself.

One suspicion is that when Disconnect is called, it issues SSH_DISCONECT command which suppose to close the socket,

then when socket is closed by remote host it will indicate that connection is closed on the client. So may be server doesnt close the socket right away and client end up waiting for socket to be closed.

 

If you can, try to run SSH server in debug mode and see what happens when you disconnect.

 

Hope it helps.

 

Thanks,

Oleg

Feb 22, 2012 at 9:55 PM

These are the logs I get from my SFTP Server, (cannot run it un debug mode), but what I can tell is the Disconnected message occured when I quit the application.
But I have send the disconnect message just after the second listing. 

02-22-2012 22:50:05 IP 192.168.0.13 SSH connection attempt.
02-22-2012 22:50:07 IP 192.168.0.13 SSH StrAbZ successfully logged on using password.
02-22-2012 22:50:07 SFTP service granted to user StrAbZ.
02-22-2012 22:50:07 IP 192.168.0.13 StrAbZ is listing / (C:\Users\StrAbZ\)
02-22-2012 22:50:07 IP 192.168.0.13 StrAbZ is listing / (C:\Users\StrAbZ\) <===== Send the disconnect message (nothing happens)
02-22-2012 22:50:26 IP 192.168.0.13 SSH StrAbZ disconnected. <===== Closed the application