Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
–1 vote
344 views
in .NET FTP by (160 points)
Hello!

I am using version 9 of the library with the code:
 

 conn = new SecureFTPConnection();

conn.ServerValidation = SecureFTPServerValidationType.None;

conn.AuthenticationMethod = EnterpriseDT.Net.Ssh.AuthenticationType.Password;

 conn.Protocol = FileTransferProtocol.SFTP;

  conn.PreferredKeyExchangeMethods = EnterpriseDT.Net.Ssh.SSHKeyExchangeMethod.All;

  conn.PreferredCipherAlgorithms = EnterpriseDT.Net.Ssh.SSHCipherAlgorithm.All;

conn.PreferredMACAlgorithms = EnterpriseDT.Net.Ssh.SSHMACAlgorithm.All;

conn.PreferredHostKeyAlgorithms = SSHPublicKeyAlgorithm.ALL;

                conn.UserName = "myid";

                conn.Password = "mypassword";

            conn.ServerAddress = "myserver";

            conn.ServerPort = 22;

            try

            {

                conn.Connect();

            }

            catch (Exception ex)

            {

                label1.Text = ex.Message;

            }

                this.Text = "Connected";

Works fine against a SFTP server on Ubuntu.

Now I'm evaluating version 11 with the trial. But using the new library, with the same code I get:

"Unknown host key algorithm ssh-ed25519"

So is this algorithm not supported in the new version or am I doing something wrong?

1 Answer

0 votes
by (8.1k points)
Hi,

I would need to see more log entries before the error.
by (160 points)
The whole log before the connect exception. As said, same code but old libraries work OK.

Licence expiry date: 2022-10-16
Trial license
Set LocalDirectory to D:\Projects\WindowsFormsApp1\WindowsFormsApp1\bin\Debug
Licence expiry date: 2022-10-16
Trial license
Setting up fallback kbi prompt based on supplied password
Set socket timeout to 120000
NoDelay=True
Beginning protocol negotiation
Timeout=120000
Sending client version=SSH-2.0-edtFTPnet/PRO_11.1.0.0
Starting Receive thread
Receive received 41 bytes
offset=0,length=41
Server version = 'SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5'
Major string = '2'
Minor string = '0'
Version 2.0
Protocol compatible
Server version=SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5
Starting key exchange
Sending SSH_MSG_KEXINIT
key exchange method=diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,ext-info-c
hostkey algorithms=ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-dss,ssh-rsa,rsa-sha2-256,rsa-sha2-512
Packet written to socket
Sent SSH_MSG_KEXINIT
Receive received 1056 bytes
Reading SSH_MSG_KEXINIT reply
Processing SSH_MSG_KEXINIT reply
Remote kex alg=curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
Decided kex alg= DiffieHellmanGroupExchangeSha256
Remote hostkey alg=rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
Decided hostkey alg= ECDSAsha2Nistp256
Remote Cipher CS=chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
Decided Cipher C->S= AES_CTR_128
Remote Cipher SC=chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
Decided Cipher S->C= AES_CTR_128
Remote MAC CS=umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
Decided MAC C->S= HMAC_SHA1
Remote MAC SC=umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
Decided MAC S->C= HMAC_SHA1
Remote Comp CS=none,zlib@openssh.com
Decided Comp C->S=None
Remote Comp SC=none,zlib@openssh.com
Decided Comp S->C=None
first_kex_packet_follows=False
Processed SSH_MSG_KEXINIT reply
Sending SSH_MSG_KEX_DH_GEX_REQUEST
Packet written to socket
Sent SSH_MSG_KEX_DH_GEX_REQUEST
Waiting for packet
Receive received 280 bytes
Packet arrived
Processing SSH_MSG_KEX_DH_GEX_GROUP reply
Packet written to socket
Sent SSH_MSG_KEX_DH_GEX_INIT
Waiting for packet
Receive received 748 bytes
ReduceBuffer()
Packet arrived
Processing SSH_MSG_KEX_DH_GEX_REPLY reply
Verifying host key
Processed SSH_MSG_KEX_DH_GEX_REPLY successfully
Sending SSH_MSG_NEWKEYS
Packet written to socket
Sent SSH_MSG_NEWKEYS
Established ciphers
Established MACs
Reading SSH_MSG_NEWKEYS reply
Processing SSH_MSG_NEWKEYS reply
Processed SSH_MSG_NEWKEYS reply
Negotiated new keys successfully
Key exchange complete
Packet written to socket
Receive received 52 bytes
Sent SSH_MSG_SERVICE_REQUEST 'ssh-userauth'
server-sig-algs: ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com
Failed to connect - closing connection
Receive thread finished.
Unknown host key algorithm ssh-ed25519
by (161k points)
Sorry for the delay in answering - this public forum isn't the best way to get support as it isn't monitored daily. Could you open a support ticket here, and attach your log file?
https://enterprisedt.atlassian.net/servicedesk/customer/portal/1/group/1/create/1

Categories

...