I'm able to connect using SFTP but when I send login credentials I am receiving an error? Any ideas?

The Log:

2010-09-01 11:08:21.687 Opening log file.
2010-09-01 11:08:21.875 ERROR Sftp(5) Info: Rebex.Net.SshException: Received invalid packet.
   at wWGvS.AIchsYZ.AcUJKJ(Byte[] )
   at Rebex.Net.SshSession.AePCoRZ(Byte[]& )
   at Rebex.Net.SshSession.cDtmAOZ(Int64& , Boolean )
   at Rebex.Net.SshSession.CFLiXJ(ANiLIV )
   at Rebex.Net.SshSession.CgoKrJZ()
   at Rebex.Net.SshSession.cCIjvV(String , String , SshPrivateKey , SshGssApiCredentials )
   at Rebex.Net.SshSession.Authenticate(String userName, String password, SshPrivateKey privateKey)
   at Rebex.Net.Sftp.Login(String userName, String password, SshPrivateKey privateKey)
2010-09-01 11:10:50.046 Opening log file.
2010-09-01 11:10:50.046 INFO Sftp(7) Info: Connecting to www.xyz.com:22 using Sftp 2.0.3854.0 (trial version).
2010-09-01 11:10:50.265 DEBUG Sftp(7) SSH: Server is 'SSH-2.0-OpenSSH_4.3'.
2010-09-01 11:10:50.265 DEBUG Sftp(7) SSH: Negotiation started.
2010-09-01 11:10:50.328 DEBUG Sftp(7) SSH: Group exchange.
2010-09-01 11:10:50.406 DEBUG Sftp(7) SSH: Negotiating key.
2010-09-01 11:10:51.343 DEBUG Sftp(7) SSH: Validating signature.
2010-09-01 11:10:51.359 DEBUG Sftp(7) SSH: Negotiation finished.
2010-09-01 11:10:51.359 INFO Sftp(7) Info: Server: SSH-2.0-OpenSSH_4.3
2010-09-01 11:10:51.359 INFO Sftp(7) Info: Fingerprint: d7:f3:65:20:ad:9c:3c:23:0e:cd:d4:d3:32:a9:42:c3
2010-09-01 11:10:51.359 INFO Sftp(7) Info: Cipher info: SSH 2.0, DiffieHellmanGroupExchangeSHA1, DSS, aes256-ctr/aes256-ctr, SHA1/SHA1

The Code:

    Sftp client = new Sftp();
    client.LogWriter = new Rebex.FileLogWriter(@"c:\work\log2.txt", Rebex.LogLevel.Debug); 
    // Create an instance of SshParameters class 
    // to specify desired arguments. 
    SshParameters par = new SshParameters();

    // Disable transfer compression 
    par.Compression = false;

    // Any key exchange method is acceptable. 
    par.KeyExchangeAlgorithms = SshKeyExchangeAlgorithm.DiffieHellmanGroupExchangeSHA1;

    // Only allow AES and 3DES encryption methods. 
    par.EncryptionAlgorithms = SshEncryptionAlgorithm.AES | SshEncryptionAlgorithm.TripleDES;

    // Connect to the server. 
    // The third argument refers to the parameters class. 
    client.Connect(FTPHost, Sftp.DefaultPort, par);



    // verify the server's fingerprint (client.Fingerprint) 

    SshPrivateKey privateKey = new SshPrivateKey(@"c://work/key_rsa.pem", "password");

    // authenticate 
    client.Login(FTPUser, privateKey);

    client.Disconnect();

asked 01 Sep '10, 18:21

Mike's gravatar image

Mike
16
accept rate: 0%

edited 21 Dec '10, 13:33

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.2k18

Hello, please create the log using LogLevel.Verbose instead of LogLevel.Debug and mail it to support@rebex.net - this should make it possible to tell what is going on.

(02 Sep '10, 09:30) Lukas Pokorny ♦♦

Is the server publicly accessible? It looks like the error occurs before authentication, so if we know its address, we could try reproducing this ourselves. If you don't need to publish the hostname, here, please mail it to us at support@rebex.net

(02 Sep '10, 09:31) Lukas Pokorny ♦♦

Sorry I haven't responded until now... was sidetracked... wife had baby. I'm going to send an email with the details shortly

(16 Sep '10, 18:21) Mike
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×115

Asked: 01 Sep '10, 18:21

Seen: 309 times

Last updated: 21 Dec '10, 13:33