EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SFTP Client Connects, SimpleSFTPDemo will not

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
Posted: 02/08/2007 07:06:11
by Cathy Bierrum (Standard support level)
Joined: 02/08/2007
Posts: 4

I am trying to write a windows service to connect to an SFTP server, and automatically download files. The SFTP Server is running on a SLES10 system with the following details:

Key Method: Diffie-Hellman-group1-SHA1
Host Key Algorithm: SSH-RSA
Session Cipher: 192 bit TripleDES-cbc
Session MAC: HMAC-MD5
Session Compressor/Decompressor: None

The Client example on SecureBlackBox 5.0.105 works perfectly, however is overly complicated for my needs. The SimpleClient looks much better, however whenever i connect, I get the error: Connection Lost.

I have tried enabling all EncryptionAlgorithms and disabling individual KexAlgorithms as stated in other posts on this forum.

Please Help!

Many Thanks,

Posted: 02/08/2007 08:36:21
by Ken Ivanov (EldoS Corp.)

Please try to turn off all the supported algorithms except the ones you need (i.e., 3DES, RSA, HMAC-MD5, DH-GROUP1-SHA1). Some servers do not behave right if they encounter algorithms they do not support.

BTW, when exactly does this error occur? Is OnError event fired?
Posted: 02/08/2007 09:40:35
by Cathy Bierrum (Standard support level)
Joined: 02/08/2007
Posts: 4

The OnError event is not fired.
Unless I am doing something wrong, disabling the above didnt help.

        SftpClient.Address = ""
        SftpClient.Port = 22
        SftpClient.Username = "user"
        SftpClient.Password = "pass"

        For i As Integer = SSH_EA_FIRST To SSH_EA_LAST
            SftpClient.EncryptionAlgorithms(i) = False
        SftpClient.EncryptionAlgorithms(SSH_EA_3DES) = True

        For i As Integer = SSH_PK_FIRST To SSH_PK_LAST
            SftpClient.PublicKeyAlgorithms(i) = False
        SftpClient.PublicKeyAlgorithms(SSH_PK_RSA) = True

        For i As Integer = SSH_MA_FIRST To SSH_MA_LAST
            SftpClient.MacAlgorithms(i) = False
        SftpClient.MacAlgorithms(SSH_MA_HMAC_MD5) = True

Posted: 02/08/2007 09:58:28
by Ken Ivanov (EldoS Corp.)

Hmm, it's quite strange. Do some entries appear in the log listview before the connection is terminated?

Just another idea -- please try to play with different SSH versions (SSH2, SSH1+SSH2). TElSimpleSFTPClient uses TElSSHClient internally, so at least SSH connection must be established correctly.
Posted: 02/12/2007 03:43:52
by Cathy Bierrum (Standard support level)
Joined: 02/08/2007
Posts: 4

The only response I get is as follows:

Server key received, fingerprint is 0456aefc3588a94a6a5670a485873e61
SFTP error 114

Incidently, If I try to connect using the simpleSSH control, then the OnAuthenticationKeyboard event is fired, asking for Password: however the program continues to connect if i ignore the prompt. I have scanned the help file, and cannot see how to disable different SSH version, so I have been unable to test what you just said.

Many Thanks,

Posted: 02/12/2007 04:16:54
by Eugene Mayevski (EldoS Corp.)

Most likely your server uses keyboard-interactive authentication. The sample asks for password, but as the data is not provided, the client automatically sends your password specifed in the Password property. But for the client to do this, you need to enable keyboard-interactive authentication using AuthenticationTypes property

Sincerely yours
Eugene Mayevski
Posted: 02/12/2007 05:14:46
by Cathy Bierrum (Standard support level)
Joined: 02/08/2007
Posts: 4

Perfect. all working now.


Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages



Topic viewed 3886 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!