Notepad++ NppFTP plugin fails to connect via SFTP

41,613

Solution 1

The solution for me was to use puttygen to export a .ppk version of my private key to OpenSSH as follows:

  1. Open PuttyGen
  2. Menu: Conversion -> Export OpenSSH key
  3. Save your new key (don't forget to make it clear it is openssh)

This was weird seeing as my .ppk was converted from a private key generated by OpenSSH itself.

I think it has to do with the fact that my original key starts with

---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----

whereas the exported key starts with

-----BEGIN RSA PRIVATE KEY-----

Solution 2

Log-in to your terminal. Make sure you are in /home/your_user_name/

First client private/public key

$ ssh-keygen -t rsa

  1. Press Enter to choose default directory
  2. You may choose a pass phrase here depending upon situation.

Now add your public rsa key details to authorized keys, use the following command

$ cat id_rsa.pub >> ~/.ssh/authorized_keys

$ chmod 600 ~/.ssh/authorized_keys

After this delete the id_rsa.pub file if you wish.

Now the private key file id_rsa is the one you need to 'import'.

You need the tool called the puttygen to import this file and then
click on the Menu Bar -> Conversions -> Export OpenSSH Key and save the exported file.

Save it as npp.ppk (maybe) and then use this in the Notepad++ Private key file path.

Solution 3

Open output connect (engine icon on the NppFTP) to see why you dont connect.

Probably the problem could be the authentication method you use. Try "keyboard interactive authentication" on the tab Authentication.

Solution 4

Go to C:\Users\[User Name]\AppData\Roaming\Notepad++\plugins\config\NppFTP

and delete the entry of the host in that file and try re-connecting.

Solution 5

When using Notepadd ++ I found that if your logging into a secure server with NppFTP and you know your user name and password but your getting [SFTP]Unable to authenticate error: Try going to toolbar -> Profile settings -> Authentication and only check the box that says try password authentication. The default is private file but, that doesn't all ways apply.
-Hope that helps-

Share:
41,613
Pavel Lint
Author by

Pavel Lint

Writing code since 2005, mostly Swift, Laravel and React today. Supporting lichess.org. Active on Stackoverflow since November 2019. Why haven't I used it before? :)

Updated on March 09, 2020

Comments

  • Pavel Lint
    Pavel Lint about 4 years

    So, i've been having this problem for a while now.

    Notepad++ NppFTP plugin fails to connect to server via SFTP with "[SFTP] Error during authentication: Invalid private key file". But the key file is 100% correct and i'm connecting fine with WinSCP.

    Any solutions?

  • w--
    w-- over 11 years
    Just adding a little more detail, the option desired is Toolbar -> Conversions -> Export OpenSSH Key. This works. OP should accept this answer
  • Daniel Dimitrov
    Daniel Dimitrov about 10 years
    Yep, exporting to openSSH did it for me as well! Thanks!
  • Krista K
    Krista K over 9 years
    Thank you for mentioning npp.ppk as using the above procedure with any other filename fails to connect for me. npp.ppk worked.
  • Brian A. Henning
    Brian A. Henning almost 9 years
    @w, you should submit your addendum as an edit to the answer; your rep is certainly high enough.
  • Medda86
    Medda86 over 7 years
    do not delete the whole folder, you lose all your saved connections
  • ints
    ints over 4 years
    Im lost here, what am i suppose to do with the key after i save it to let´s say desktop? Also could anyone tell me why doesnt my nppftp connect vis sFTP using password. Getting an error "None of the server's authentication methods were accepted". Meanwhile winSCP connects effortlessly with same parameters.