Cannot connect to SFTP server with SSH key

Questions about Cobian Reflector
Post Reply
Chicken76
Posts: 3
Joined: 02 Jul 2024, 10:29

Cannot connect to SFTP server with SSH key

Post by Chicken76 »

The error is:

Code: Select all

Unknown algorithm none
The SSH key is not password protected.

Here's the advanced log:

Code: Select all

Testing your sftp settings...

Licence expiry date: 31-Dec-99
Set LocalDirectory to C:\Windows\system32
Licence expiry date: 31-Dec-99
Set socket timeout to 120000
NoDelay=True
Beginning protocol negotiation
Timeout=120000
Sending client version=SSH-2.0-edtFTPnet/PRO_11.1.1.0
Starting Receive thread
Receive received 40 bytes
offset=0,length=40
Server version = 'SSH-2.0-OpenSSH_9.2p1 Debian-2+deb12u3'
Major string = '2'
Minor string = '0'
Version 2.0
Protocol compatible
Server version=SSH-2.0-OpenSSH_9.2p1 Debian-2+deb12u3
Receive received 1112 bytes
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
Packet written to socket
Sent SSH_MSG_KEXINIT
Reading SSH_MSG_KEXINIT reply
Processing SSH_MSG_KEXINIT reply
Remote kex alg=sntrup761x25519-sha512@openssh.com,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,kex-strict-s-v00@openssh.com
Decided kex alg= DiffieHellmanGroupExchangeSha256
Remote hostkey alg=rsa-sha2-512,rsa-sha2-256,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
Receive received 828 bytes
Sent SSH_MSG_KEX_DH_GEX_INIT
ReduceBuffer()
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,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com,ssh-dss,ssh-rsa,rsa-sha2-256,rsa-sha2-512
Public key authentication
Unpacking OpenSSH new format private key
New format OpenSSH private key
Failed to connect - closing connection
Unknown algorithm none
Receive thread finished.
Closing socket as poll timed out
It works with password authentication though.
User avatar
cobian
Site Admin
Posts: 4809
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Cannot connect to SFTP server with SSH key

Post by cobian »

What kind of server is that?
--
Luis Cobian
Cobian Backup's creator
Chicken76
Posts: 3
Joined: 02 Jul 2024, 10:29

Re: Cannot connect to SFTP server with SSH key

Post by Chicken76 »

Debian 12
User avatar
cobian
Site Admin
Posts: 4809
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Cannot connect to SFTP server with SSH key

Post by cobian »

And what FTP server? Vsftpd? ProFtpD? FileZilla FTP? PureFTP?
--
Luis Cobian
Cobian Backup's creator
Chicken76
Posts: 3
Joined: 02 Jul 2024, 10:29

Re: Cannot connect to SFTP server with SSH key

Post by Chicken76 »

FTP is not involved. SFTP is just SSH.
I've checked from another linux machine and ssh-ing into that server works with either key or password.
It's strange that it works with a password, but not with a key.
User avatar
cobian
Site Admin
Posts: 4809
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Cannot connect to SFTP server with SSH key

Post by cobian »

Sorry, I misread the question.

Will check this out.
--
Luis Cobian
Cobian Backup's creator
User avatar
cobian
Site Admin
Posts: 4809
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Cannot connect to SFTP server with SSH key

Post by cobian »

Yes, it seems to be some kind of error there. The sftp libraries I am using are quite buggy it seems. I really recommend (if somebody takes over the development) to replace them with (for example) Ssh.net .
--
Luis Cobian
Cobian Backup's creator
Post Reply