login about faq

I was following an TCL SFTP example provided by this ChilKat example. The firewall of my servers are disabled and it seems that script fails at CkSFtp_Connect level and never proceeds to the authentication. I attached the chilkat log output below. The log file doesn't seem to indicate any error. Any help is appreciated! thank you.

connecting ChilkatLog: Connect_SFtp: DllDate: May 26 2017 ChilkatVersion: 9.5.0.68 UnlockPrefix: Anything for 30 day trial Architecture: Little Endian; 64-bit Language: Linux Tcl VerboseLogging: 0 SftpVersion: 0 connectInner: sshConnect: Established TCP/IP connection with SSH server --sshConnect sshSetupConnection: clientIdentifier: SSH-2.0-PuTTY_Release_0.69 Sending client identifier... Done sending client identifier. Reading server version... initialDataFromSshServer: SSH-2.0-OpenSSH_6.6.1

    serverVersion: SSH-2.0-OpenSSH_6.6.1
    KeyExchangeAlgs:
      algorithm: curve25519-sha256@libssh.org
      algorithm: ecdh-sha2-nistp256
      algorithm: ecdh-sha2-nistp384
      algorithm: ecdh-sha2-nistp521
      algorithm: diffie-hellman-group-exchange-sha256
      algorithm: diffie-hellman-group-exchange-sha1
      algorithm: diffie-hellman-group14-sha1
      algorithm: diffie-hellman-group1-sha1
    --KeyExchangeAlgs
    HostKeyAlgs:
      algorithm: ssh-rsa
      algorithm: ecdsa-sha2-nistp256
      algorithm: ssh-ed25519
    --HostKeyAlgs
    EncCS:
      algorithm: aes128-ctr
      algorithm: aes192-ctr
      algorithm: aes256-ctr
      algorithm: arcfour256
      algorithm: arcfour128
      algorithm: aes128-gcm@openssh.com
      algorithm: aes256-gcm@openssh.com
      algorithm: chacha20-poly1305@openssh.com
      algorithm: aes128-cbc
      algorithm: 3des-cbc
      algorithm: blowfish-cbc
      algorithm: cast128-cbc
      algorithm: aes192-cbc
      algorithm: aes256-cbc
      algorithm: arcfour
      algorithm: rijndael-cbc@lysator.liu.se
    --EncCS
    EncSC:
      algorithm: aes128-ctr
      algorithm: aes192-ctr
      algorithm: aes256-ctr
      algorithm: arcfour256
      algorithm: arcfour128
      algorithm: aes128-gcm@openssh.com
      algorithm: aes256-gcm@openssh.com
      algorithm: chacha20-poly1305@openssh.com
      algorithm: aes128-cbc
      algorithm: 3des-cbc
      algorithm: blowfish-cbc
      algorithm: cast128-cbc
      algorithm: aes192-cbc
      algorithm: aes256-cbc
      algorithm: arcfour
      algorithm: rijndael-cbc@lysator.liu.se
    --EncSC
    MacCS:
      algorithm: hmac-md5-etm@openssh.com
      algorithm: hmac-sha1-etm@openssh.com
      algorithm: umac-64-etm@openssh.com
      algorithm: umac-128-etm@openssh.com
      algorithm: hmac-sha2-256-etm@openssh.com
      algorithm: hmac-sha2-512-etm@openssh.com
      algorithm: hmac-ripemd160-etm@openssh.com
      algorithm: hmac-sha1-96-etm@openssh.com
      algorithm: hmac-md5-96-etm@openssh.com
      algorithm: hmac-md5
      algorithm: hmac-sha1
      algorithm: umac-64@openssh.com
      algorithm: umac-128@openssh.com
      algorithm: hmac-sha2-256
      algorithm: hmac-sha2-512
      algorithm: hmac-ripemd160
      algorithm: hmac-ripemd160@openssh.com
      algorithm: hmac-sha1-96
      algorithm: hmac-md5-96
    --MacCS
    MacSC:
      algorithm: hmac-md5-etm@openssh.com
      algorithm: hmac-sha1-etm@openssh.com
      algorithm: umac-64-etm@openssh.com
      algorithm: umac-128-etm@openssh.com
      algorithm: hmac-sha2-256-etm@openssh.com
      algorithm: hmac-sha2-512-etm@openssh.com
      algorithm: hmac-ripemd160-etm@openssh.com
      algorithm: hmac-sha1-96-etm@openssh.com
      algorithm: hmac-md5-96-etm@openssh.com
      algorithm: hmac-md5
      algorithm: hmac-sha1
      algorithm: umac-64@openssh.com
      algorithm: umac-128@openssh.com
      algorithm: hmac-sha2-256
      algorithm: hmac-sha2-512
      algorithm: hmac-ripemd160
      algorithm: hmac-ripemd160@openssh.com
      algorithm: hmac-sha1-96
      algorithm: hmac-md5-96
    --MacSC
    CompCS:
      algorithm: none
      algorithm: zlib@openssh.com
    --CompCS
    CompSC:
      algorithm: none
      algorithm: zlib@openssh.com
    --CompSC
    ChosenIncomingEncryption: chacha20-poly1305@openssh.com
    ChosenOutgoingEncryptoin: chacha20-poly1305@openssh.com
    ChosenIncomingMac: hmac-sha1
    ChosenOutgoingMac: hmac-sha1
    ChosenIncomingCompression: none
    ChosenOutgoingCompression: none
    ChosenKexAlgorithm: curve25519-sha256@libssh.org
    ChosenHostKeyAlgorithm: ssh-rsa
    Using SHA256 for Key Exchange Hash
    verifyHostKey:
      rsaHostKeyVerify:
        alg: ssh-rsa
      --rsaHostKeyVerify
    --verifyHostKey
    Sending newkeys to server...
    Expecting newkeys from server...
    SSH Key Exchange Success.
    installNewKeys:
      m_isRekey: 0
      No outgoing compression.
      No incoming compression.
      Outgoing encryption is now chacha20-poly1305@openssh.com
      Incoming encryption is now chacha20-poly1305@openssh.com
    --installNewKeys
  --sshSetupConnection
  socketOptions:
    SO_SNDBUF: 425984
    SO_RCVBUF: 425984
    TCP_NODELAY: 1
    SO_KEEPALIVE: 0
  --socketOptions
--connectInner
Success.   --Connect_SFtp

--ChilkatLog

asked Jul 21 at 12:43

TCL_ChilKat's gravatar image

TCL_ChilKat
1


The Connect call worked, so it must be that the TCL example code is incorrect? This is the snippet for the Connect call and checking the return value:

set hostname "www.my-ssh-server.com"
set port 22
set success [CkSFtp_Connect $sftp $hostname $port]
if {[expr $success != 1]} then {
    puts [CkSFtp_lastErrorText $sftp]
    delete_CkSFtp $sftp
    exit
}

What is the value of $success that was returned? Maybe the expression in the "if" statement is not correct?

link

answered Jul 21 at 13:01

chilkat's gravatar image

chilkat ♦♦
12.8k317366476

For example, did $success equal -1?

(Jul 21 at 13:03) chilkat ♦♦

I have something like

set hostname 10.10.10.24 set port 22 puts "connecting" set success [CkSFtp_Connect $sftp $hostname $port] puts "success value is $success" if {[expr $success != 1]} then { puts [CkSFtp_lastErrorText $sftp] delete_CkSFtp $sftp exit }

and the success value is 1

(Jul 21 at 14:25) TCL_ChilKat

If $success equals 1, then it means the Connect succeeded. There's no actual problem here..

(Jul 21 at 16:02) chilkat ♦♦

So after connect there is an authentication call, I added a print statement prior to it but nothing got printed out and the file I was trying to download never gets fetched.

(Jul 22 at 21:55) TCL_ChilKat
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:

×226
×16

Asked: Jul 21 at 12:43

Seen: 215 times

Last updated: Jul 22 at 21:55

powered by OSQA