Problems Connecting with SFTP

0 votes
asked Jan 5, 2011 by Mark Baker (120 points)
edited Jan 5, 2011

Hello, we are evaluating at the moment and are having trouble authenticating SFTP connections. The connection works fine, but when we attempt to Login we are getting various failures:

The session was closed by the remote connection end or Invalid packet

The error depends on the server that we are trying to connect to.

It all cases we are using a user name and password to authenticate, so no PKI authentication. If we use a regular SFTP client e.g. Core or Cute then connecting to the server works fine.

The only thing I can think of is that I notice if you use Core FTP as a client or Cute FTP you are prompted as to whether you want to trust and cache the services key. Do we need to trust the services key somehow in code? If so how do we do that?

Thanks, Mark

1 Answer

0 votes
answered Jan 6, 2011 by Lukas Pokorny (94,270 points)

Would it be possible to create a communication log using Sftp object's LogWriter property (as described at http://rebex.net/kb/logging.aspx) and either add that to your post or mail it to support@rebex.net for analysis? That should make it possible to tell what is going on!

But this is definitely not caused by an untrusted key - unless you add a code to check the key (as described at http://www.rebex.net/sftp.net/tutorial-sftp.aspx#basics), all keys are accepted by default.

...