Archived Forum Post

Index of archived forum posts

Question:

Failed to connect. Failed to read initial server version string

Nov 16 '16 at 13:51

Hello! I'm testing Chilkat library to upload files to sftp server but when I try to connect, I obtain the next message:

ChilkatLog:
Connect_SFtp:
DllDate: Nov 12 2016
ChilkatVersion: 9.5.0.64
UnlockPrefix: xyz
Architecture: Little Endian; 32-bit
Language: ActiveX
VerboseLogging: 0
SftpVersion: 0
connectInner:
  sshConnect:
    Established TCP/IP connection with SSH server
  --sshConnect
  sshSetupConnection:
    clientIdentifier: SSH-2.0-PuTTY_Release_0.66
    Sending client identifier...
    Done sending client identifier.
    Reading server version...
    sockRecv: Socket connection closed.
    Failed to read initial server version string
    bytesReceived: 
  --sshSetupConnection
--connectInner
Failed.

--Connect_SFtp --ChilkatLog

If I try to connect via Explorer I don't have any problem.

Thanks


Accepted Answer

What port are you connecting to? If it's port 21 or port 990, then you're talking to an FTP server, not an SSH/SFTP server. In that case, you should be using the FTP2 API because the server is speaking the FTP protocol, not SSH.