mhogomchungu / sirikali

A Qt/C++ GUI front end to sshfs, ecryptfs-simple, cryfs, gocryptfs, securefs, fscrypt and encfs
http://mhogomchungu.github.io/sirikali
GNU General Public License v3.0
742 stars 58 forks source link

Support for OpenSSH agent authentication ? #226

Open aetonsi opened 1 year ago

aetonsi commented 1 year ago

Hello i've tried to connect to my ssh fs via a passphrase encrypted key file, as per #218 , but i've never been able to make it work. As also https://github.com/mhogomchungu/sirikali/issues/218#issuecomment-1290739714 explicitly asks, it would be useful if Sirikali could work using windows' OpenSSH, which is well integrated in the OS at this point. This could simply mean using the ssh.exe binary located in C:\Windows\System32\OpenSSH or C:/Windows/Sysnative/OpenSSH (since it appears that the app is 32 bit so system32 is shadowed). I tried prepending both paths to the "executable paths" in sirikali's settings, but it didn't work. An alternative would be to allow the use of OpenSSH's ssh-add.exe to return the key/keys to try: C:\Windows\System32\OpenSSH\ssh-add.exe -L returns every public key registered with the agent, one per line.

Could any of this be possible via the sshfs argument -o ssh_command=... ? I see that there's already an "ExternalExecutable" key option that maybe can already be of help, but i don't understand how it works and i can't find any documentation.

Thank you for your time

aetonsi commented 1 year ago

Mmh i see from the winsfp/sshfs-win repo that agent support (openssh or others) has already been discussed there without any solution... i guess Sirikali depends entire on that repo, right?

mhogomchungu commented 1 year ago

SiriKali just sets "SSH_AUTH_SOCK" environmental variable and its up to sshfs-win to pick it up and use it so SiriKali/sshfs-win should work with any key agent that supports sending credentials to sshfs-win through a socket path.

The question is, does "ssh-add.exe" create a unix socket path for sshfs-win to use?

aetonsi commented 1 year ago

Mmh i sincerely don't know, but if you're referring to this PowerShell/Win32-OpenSSH#1761 , then no, i don't think so