evsar3 / sshfs-win-manager

A GUI for SSHFS-Win (https://github.com/billziss-gh/sshfs-win)
MIT License
1.14k stars 85 forks source link

ssh with private key that is password protected #65

Closed alessandroaimar closed 3 years ago

alessandroaimar commented 3 years ago

Hi,

I tried to connect using the id_rsa private key file. However, the program does not ask me for the passphrase and can't connect. Any plan to support this in the future?

Here is the log:

date: 2020-12-31T15:29:17.348Z conn: {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} (xxxxxxxxxxxxx) conntype: key-file cmd: "C:\Program Files\SSHFS-Win\bin\sshfs.exe" xxxx@xxxxxxxxxxxxxxxx:/ R: -p23 -ovolname=xxxxxxxx-odebug -ologlevel=debug1 -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oidmap=user -ouid=-1 -ogid=-1 -oumask=000 -ocreate_umask=000 -omax_readahead=1GB -oallow_other -olarge_read -okernel_cache -ofollow_symlinks -oPreferredAuthentications=publickey -oIdentityFile="C:/Users/xxxxxxxxx/.ssh/id_rsa" {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} stderr: SSHFS version 3.5.2 {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} stderr: executing <-x> <-a> <-oClearAllForwardings=yes> <-oPort=23> <-ologlevel=debug1> <-oStrictHostKeyChecking=no> <-oUserKnownHostsFile=/dev/null {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} stderr: > <-oPreferredAuthentications=publickey> <-oIdentityFile="C:/Users/xxxxxxxxx/.ssh/id_rsa"> <-2> xxxxx@xxxxxxxxxx <-s> {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} stderr: debug1: Connecting to xxxxxxxxxxx [xxxxxxxxxxx] port 23. {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} stderr: debug1: Connection established. debug1: identity file C:/Users/xxxxxxxxx/.ssh/id_rsa type 0 debug1: identity file C:/Users/xxxxxxxxx/.ssh/id_rsa-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_8.4 {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} stderr: debug1: SSH2_MSG_KEXINIT sent {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} stderr: debug1: Server host key: ecdsa-sha2-nistp256 SHA256:gpPnH/nV2Uf94WcX0Wd6wyzEAZLxrw0DdwD2i18HHLY {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} stderr: debug1: SSH2_MSG_SERVICE_ACCEPT received {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} stderr: debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic debug1: Next authentication method: publickey debug1: Offering public key: C:/Users/xxxxxxxxx/.ssh/id_rsa RSA SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx explicit {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} stderr: debug1: Server accepts key: C:/Users/xxxxxxxxx/.ssh/id_rsa RSA SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx explicit debug1: read_passphrase: can't open /dev/tty: No such device or address debug1: No more authentication methods to try. xxxxxxxxx@xxxxxxxxxxxxx: Permission denied (publickey,gssapi-keyex,gssapi-with-mic). read: Connection reset by peer {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} exit:

evsar3 commented 3 years ago

This feature is not supported yet.

There is no plans for implementing authentication with password-protected key at moment. This envolves a lot of complexity that's already been discussed on #12 and #27.

cmanley commented 3 years ago

Please make this limitation clear on the main page because it'll save a lot of people a lot of time trying to figure out why it's not working. I was struggling with the same issue until I found this closed ticket.