Question:
I'm having a problem to connect to the IPSwitch SFTP Server.
This is the sample code i'm using in my program.
success = sftp.Connect(hostname, port)
It return false when it reach the line above.
Dim port As Integer
Dim hostname As String
hostname = tempArrUrl(2) 'ftpServer
port = CInt(strPort)
' Load a .ppk PuTTY private key.
Dim puttyKey As New Chilkat.SshKey()
Dim ppkText As String = puttyKey.LoadText(puttyloc)
' "secret" is the actual password for the above PPK.
puttyKey.Password = puttyPW
success = puttyKey.FromPuttyPrivateKey(ppkText)
If success <> True Then
log.fErrorLog(sftp.LastErrorText & "-SFTPTest - Failed to Load Putty Key - " & trackNo)
End If
' Connect to an SSH/SFTP server
***success = sftp.Connect(hostname, port)***
If success <> True Then
log.fErrorLog(sftp.LastErrorText & "-SFTPTest - Failed toConnect to Server - " & trackNo)
End If
ChilkatLog: Connect_SFtp: DllDate: May 25 2017 ChilkatVersion: 9.5.0.68 UnlockPrefix: XXXXXX Architecture: Little Endian; 32-bit Language: .NET 2.0 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-WS_FTP-SSH_8.5.0
serverVersion: SSH-2.0-WS_FTP-SSH_8.5.0
KeyExchangeAlgs:
algorithm: diffie-hellman-group1-sha1
algorithm: diffie-hellman-group14-sha1
algorithm: diffie-hellman-group14-sha256
algorithm: diffie-hellman-group-exchange-sha256
--KeyExchangeAlgs
HostKeyAlgs:
algorithm: ssh-dss
algorithm: ssh-rsa
--HostKeyAlgs
EncCS:
algorithm: aes256-ctr
algorithm: aes192-ctr
algorithm: aes128-ctr
algorithm: 3des-cbc
algorithm: blowfish-cbc
algorithm: aes256-cbc
algorithm: aes128-cbc
algorithm: cast128-cbc
--EncCS
EncSC:
algorithm: aes256-ctr
algorithm: aes192-ctr
algorithm: aes128-ctr
algorithm: 3des-cbc
algorithm: blowfish-cbc
algorithm: aes256-cbc
algorithm: aes128-cbc
algorithm: cast128-cbc
--EncSC
MacCS:
algorithm: hmac-md5
algorithm: hmac-sha1
algorithm: hmac-sha1-96
algorithm: hmac-md5-96
algorithm: hmac-sha2-256
algorithm: hmac-sha2-384
algorithm: hmac-sha2-512
--MacCS
MacSC:
algorithm: hmac-md5
algorithm: hmac-sha1
algorithm: hmac-sha1-96
algorithm: hmac-md5-96
algorithm: hmac-sha2-256
algorithm: hmac-sha2-384
algorithm: hmac-sha2-512
--MacSC
CompCS:
algorithm: none
--CompCS
CompSC:
algorithm: none
--CompSC
ChosenIncomingEncryption: aes128-ctr
ChosenOutgoingEncryptoin: aes128-ctr
ChosenIncomingMac: hmac-sha1
ChosenOutgoingMac: hmac-sha1
ChosenIncomingCompression: none
ChosenOutgoingCompression: none
ChosenKexAlgorithm: diffie-hellman-group-exchange-sha256
ChosenHostKeyAlgorithm: ssh-rsa
sshRawPacket: Socket connection closed.
sshDhGex: Socket connection closed.
Failed to read KEX_DH_GEX_REQUEST response
--sshSetupConnection
--connectInner
Failed.
--Connect_SFtp --ChilkatLog
Please post the hostname or IP address and port number (if different than 22) so that I can reproduce the problem (or send the hostname/IP to support@chilkatsoft.com).
I'm using localhost as hostname with port number 22 for testing on local pc.
Unfortunately, that doesn't really help.