ashkulz / NppFTP

Plugin for Notepad++ allowing FTP, FTPS, FTPES and SFTP communications
https://ashkulz.github.io/NppFTP/
321 stars 93 forks source link

SFTP Key authentication denied by using dns name instead ip address #335

Open martin8205 opened 2 years ago

martin8205 commented 2 years ago

I have been using nppftp for a long time. Now I have problems to connect to a server with SFTP / private key file. The error '[SFTP] Key authentication denied' is displayed.

If I enter the dns name as hostname, no connection can be established. However, if I use the IP address (local or public), everything works without problems.

If i connect the first time to the server with the dns name after i have reinstalled nppftp, also the question "do yout trust the host key" appears which is then stored in the file known_hosts. Nevertheless the connection does not work.

I create the key pairs with PuttyGen v0.76 32bit (with or without passphrase) and use the converted OpenSSH key (-----BEGIN RSA PRIVATE KEY-----). Alternatively I also created a key pair via Linux ssk-keygen -t rsa. With both approaches, the same error occurs. With Putty itself or with Filezilla I can connect with hostname or IP address and the key file (.ppk).

What am I doing wrong?

I use notepad++ v8.2 (32-bit potrable) with NppFTP 0.29.8 / OpenSSL 1.0.2u / libSSH 0.9.6 / zlib 1.2.11.

chcg commented 1 year ago

@martin8205 Could you try with latest version https://github.com/ashkulz/NppFTP/releases/tag/v0.29.12 with updated libssh component to 0.10.4.

martin8205 commented 1 year ago

Successfully upgraded from version v0.29.8 to v0.29.12. Now the authentication via key also works with dns names without problems. Thank you very much!!!