Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.4k views
in .NET FTP by (780 points)
I am using edtFTPnetPro v.4.2 and the SecureFTPConnection class with AutoLogin and SFTP. When I call the Connect procedure, if the provided password is incorrect, a Ssh.SFTPException with ReplyCode=-1 is thrown. At this point, is the underlying socket actually closed and disconnected from the server? If I call Connect again with a different password, does the initial socket connection have to be recreated before the password can be sent, or does it use the same socket from the previous call?

I ask this because I had trouble connecting to a Linux system and trying different passwords that the user provided because the system was blocking me from connecting for a certain time after a given number of failed attempts. One of our other developers suggested trying each password on a different connection, but I thought that the SecureFTPConnection class was probably already doing this behind the scenes, and didn't think changing to multiple instances of the class would make any difference.

2 Answers

0 votes
by (162k points)
You are correct. When there is an authentication failure, the underlying socket is closed.
0 votes
by (780 points)
Thanks, I was pretty sure that was how it worked, but wanted to make sure. No need for me to try some off the wall scheme if it probably won't make a difference.

Categories

...