login about faq

Having trouble getting the sftp/ssh to work following the c# example and using the 9.4 version.

sftp.Connect(host,port) works ok, sshkey.LoadText(keyfile) and sshkey.FromPuttyPrivateKey work ok, but as soon as i try sftp.AuthenticatePk(user, key) I get the timeout shown below.

Is there anything we need to load related to the public key from the SSH server I'm connecting to or is that just assumed to be ok?

At the moment this looks just like another issue reported with 9.3.2-ios-6.0 that was fixed with a different build, but I'm assuming user error somewhere still....

thanks, Steve

Error: Unable to AuthenticatePk, Login Failed, 
ChilkatLog:
  AuthenticatePk:
    DllDate: Dec 12 2012
    UnlockPrefix: <deleted>
    Username: HPDV4:sjs
    Architecture: Little Endian; 32-bit
    Language: .NET 2.0
    VerboseLogging: 0
    SshVersion: SSH-2.0-Maverick_SSHD
    SftpVersion: 0
    login: <deleted>
    SentServiceReq: ssh-userauth
    genRead_2:
      Timeout waiting to read socket or accept connection
      timeoutMs: 15000
      SSH readRawPacket: Socket read timed out.
    --genRead_2
    Error reading service accept.
    Failed.
  --AuthenticatePk
--ChilkatLog

SessionLog=TRAN* Established TCP/IP connection with SSH server
TRAN> SSH-2.0-PuTTY_Local:_May_11_2009_17:22:38
TRAN< SSH-2.0-Maverick_SSHD
TRAN> KEXINIT
TRAN< KEXINIT
TRAN* Key Algorithms: diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1
TRAN* Host Key Algorithms: ssh-rsa
TRAN* Out Encryption: aes128-cbc,aes256-cbc,aes192-cbc,3des-cbc,twofish256-cbc,twofish192-cbc,twofish128-cbc,blowfish-cbc,cast128-cbc
TRAN* In Encryption: aes128-cbc,aes256-cbc,aes192-cbc,3des-cbc,twofish256-cbc,twofish192-cbc,twofish128-cbc,blowfish-cbc,cast128-cbc
TRAN* Out MAC: hmac-sha1,hmac-sha1-96
TRAN* In MAC: hmac-sha1,hmac-sha1-96
TRAN* Out Compress: zlib
TRAN* In Compress: zlib
TRAN> KEX_DH_GEX_REQUEST
TRAN< KEX_DH_GEX_GROUP/KEXDH_REPLY
TRAN> KEXDH_INIT
TRAN< KEX_DH_GEX_REPLY
TRAN* RSA signature verified
TRAN> NEWKEYS
TRAN< NEWKEYS
TRAN* SSH Key Exchange Success.
TRAN> IGNORE
TRAN> SERVICE_REQUEST

CodeSnip:

ftpproc.KeepSessionLog = true;
ftpproc.ConnectTimeoutMs = 15000;
ftpproc.IdleTimeoutMs = 15000;

ok = ftpproc.Connect(Host, PortNum);
if (!ok)
   s.Append("Connect Failed: " + Environment.NewLine + ftpproc.SessionLog + Environment.NewLine);

Chilkat.SshKey key = new SshKey();
string priKey = key.LoadText(KeyFile);

if (ok)
{
  ok = (priKey != null);
  if (!ok)
     s.Append("Error: Null Private Key For SFTP, error=" + key.LastErrorText + Environment.NewLine);
}

if (ok)
{
  ok = key.FromPuttyPrivateKey(priKey);
  if (!ok)
     s.Append("Error: FromPuttyPrivateKey, error=" + key.LastErrorText + Environment.NewLine);
}

if (ok)
{
   ok = ftpproc.AuthenticatePk(User, key);
   if (!ok)
      s.Append("Error: Unable to AuthenticatePk, Login Failed, " + Environment.NewLine + 
            "FtpLastError=" + ftpproc.LastErrorText + Environment.NewLine + 
                "SessionLog=" + ftpproc.SessionLog);
}

asked May 29 '13 at 12:27

sjsgroup's gravatar image

sjsgroup
6223


Please check to see if this new build resolves the problem:

http://www.chilkatsoft.com/preRelease/ChilkatDotNet2-9.4.1-win32.zip

link

answered May 30 '13 at 09:08

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

The updated 9.4.1 preRelease build looks good with the testing I've done so far.

Any idea when this version will be officially released?

thanks, Steve

link

answered Jun 11 '13 at 22:17

sjsgroup's gravatar image

sjsgroup
6223

Make sure to follow the tech notes blog: http://www.cknotes.com/?cat=100

link

answered Jun 12 '13 at 11:04

Gert's gravatar image

Gert ♦
629141824

Your answer
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:

×200

Asked: May 29 '13 at 12:27

Seen: 1,110 times

Last updated: Jun 12 '13 at 11:04

powered by OSQA