NppFTP icon indicating copy to clipboard operation
NppFTP copied to clipboard

read %UserProfile%\.ssh\config

Open bagratte opened this issue 9 years ago • 6 comments

for sftp connections, please make NppFTP read %UserProfile%.ssh\config (or, perhaps, provide an analogous %AppData%\Notepad++\plugins\config\NppFTP\ssh_config). This is often needed to connect to hosts that require nondefault ssh configurations, like, for example, hosts behind some proxy.

thanks

bagratte avatar May 28 '15 17:05 bagratte

Can you give an example of what you need to configure and where NppFTP fails? libssh should be reading %UserProfile%\.ssh\config automatically.

ashkulz avatar May 29 '15 04:05 ashkulz

this is my ssh config file to connect to the target machine:

Host target.domain.com
    ProxyCommand ssh -q -W target:%p intermediate.domain.com

with this as my NppFTP connection settings (from %AppData%\Notepad++\plugins\NppFTP\NppFTP.xml):

<Profile name="target" hostname="target.domain.com" port="22" username="myusername" password="" askPassword="0" timeout="30" securityMode="3" transferMode="0" connectionMode="0" dataPortMin="10000" dataPortMax="32000" listParams="" initialDir="" keyFile="C:\Users\bagratte\.ssh\id_rsa" passphrase="my passphrase hash" askPassphrase="0" useAgent="0" acceptedMethods="2">
    <Cache />
    <FileTypes asciiTypes="" binaryTypes="" />
</Profile>

it connects to intermediate. now, target.domain.com resolves to intermediate.domain.com, that's why i think NppFTP doesn't read the config file. also, in ssh config, you can put anything as Host, e. g. Host foo, and then do ssh foo. i've done this, and NppFTP complained that it failed to resolve hostname foo. all indices that NppFTP doesn't read ssh config.

with a copy of the above ssh config file i am able to ssh to the target machine on cygwin. i am not able to ssh to the target machine through an ssh binary compiled with mingw (git bash): "ssh_exchange_identification: Connection closed by remote host". i wonder if these are caused by version differences. these are my versions:

  • NppFTP:
    • zlib version: 1.2.8
    • libssh version: 0.6.5
    • OpenSSL version: OpenSSL 1.0.2a 19 Mar 2015
    • NppFTP version: 0.26.3 Unicode
  • cygwin ssh
    • OpenSSH_6.8p1, OpenSSL 1.0.2a 19 Mar 2015
  • mingw ssh
    • OpenSSH_6.6.1p1, OpenSSL 1.0.1m 19 Mar 2015

bagratte avatar May 29 '15 10:05 bagratte

Could you confirm that libssh read %UserProfile%.ssh\config automatically.

I need to add an algo using this configuration file and it seems that it is not read. Host * KexAlgorithms +diffie-hellman-group1-sha1

Thank you

jmlegoff avatar Feb 03 '16 09:02 jmlegoff

Is there a confirmed ssh/config file that is read for NppFTP? I'd really like to get a multi-hop sftp working. Thanks!

john-cabaj avatar Mar 03 '16 07:03 john-cabaj

It's been 6 years since the last comment regarding NppFTP support for jumpbox or proxy connections.

Can the -J option be added to the config file so a connection such as (see below) can be used? ssh -A -J jumpbox destination

jrhegerty avatar Oct 31 '22 13:10 jrhegerty

@chcg Are there any updates on this ? I also want to use nppftp with Proxy, but haven't figured how to ..

thangld201 avatar Nov 09 '22 08:11 thangld201