Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Notepad++ NppFTP plugin fails to connect via SFTP

Tags:

notepad++

sftp

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?

like image 378
Pavel Lint Avatar asked Jan 20 '12 10:01

Pavel Lint


3 Answers

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-----
like image 108
strocknar Avatar answered Oct 14 '22 10:10

strocknar


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.

like image 6
amresh tripathi Avatar answered Oct 14 '22 08:10

amresh tripathi


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.

like image 2
Dhilip Kumar S Avatar answered Oct 14 '22 09:10

Dhilip Kumar S