evsar3 / sshfs-win-manager

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

Public key authentication protected by passphrase not working with ssh-pageant #163

Open ccy opened 2 years ago

ccy commented 2 years ago

I install ssh-pageant and launch it:

set SSH_AUTH_SOCK=%TEMP%\ssh-pageant.socket
ssh-pageant.exe -r -a %SSH_AUTH_SOCK%

I also have my putty's pageant.exe load with a passphrase protected id_ed25519 key.

I setup a sshfs mount using command line:

"C:\Program Files\SSHFS-Win\bin\sshfs.exe" admin@192.168.1.1:/ W: -d -o ssh_command=bin/ssh.exe -o umask=000 -o create_file_umask=133 -o create_dir_umask=022 -o loglevel=debug3

The sshfs mount works without asking any passphrase.

I also make sure my environment variable has this set in my user profile:

SSH_AUTH_SOCK=%TEMP%\ssh-pageant.socket

I launch SSHFS-Win Manager.exe and attempt to mount admin@192.168.1.1 without any key specify, but it fail with:


--------------------------------------------------------------------------------
date: 2022-08-21T04:06:23.740Z
conn: {75c482bb-1923-425d-aa6e-cd550abcb2ec} (initramfs-build)
conntype: key-file
cmd: "C:\Program Files\SSHFS-Win\bin\sshfs.exe" admin@192.168.1.1:/ E: -p22 -ovolname=test -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=""
{75c482bb-1923-425d-aa6e-cd550abcb2ec} stderr: SSHFS version 3.5.2
{75c482bb-1923-425d-aa6e-cd550abcb2ec} stderr: executing <ssh> <-x> <-a> <-oClearAllForwardings=yes> <-oPort=22> <-ologlevel=debug1> <-oStrictHostKeyChecking=no> <-oUserKnownHostsFile=/dev/null> <-oPreferredAuthentications=publickey> <-oIdentityFile=""> <-2> <admin@192.168.1.1> <-s> <sftp>
{75c482bb-1923-425d-aa6e-cd550abcb2ec} stderr: command-line line 0: Missing argument.
{75c482bb-1923-425d-aa6e-cd550abcb2ec} stderr: read: Connection reset by peer
{75c482bb-1923-425d-aa6e-cd550abcb2ec} exit: 1

Can SSHFS-Win Manager works with ssh-pageant? Or perhaps my configuration is incorrect?