Open byteoctopus opened 6 years ago
Hi there. What is your command line invocation?
sshfs -d z -r /home/user -h domain.xyz -u user -x
So you entered the password manually, and it failed? Could you try echo "yourpass" | ...
?
Yes, I manually entered the password.
Using echo "password" | sshfs -d z -r /home/user -h domain.xyz -u user -x
results in
Failed to authenticate using password, falling back to next auth mechanism if available.
Failed to authenticate using keyboard-interactive, falling back to next auth mechanism if available.
Unhandled Exception: System.InvalidOperationException: Could not connect to server with any known authentication mechanism
at SSHFS.CLI.Program.Start(Options options) in C:\projects\win-sshfs\Sshfs\SSHFS.CLI\Program.cs:line 83
at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
at SSHFS.CLI.Program.Main(String[] args) in C:\projects\win-sshfs\Sshfs\SSHFS.CLI\Program.cs:line 70
It seems like authentication is failing, at least for the user you're attempting to log in as. Have you tried using regular ssh
to log in with the same credentials?
Yes, ssh logins work via linux/putty/cygwin. The server prompts the user for a two factor authentication option (phone, mobile app, etc.) and logs in once that gets approved.
@byteoctopus I see. That's probably the issue; right now the "keyboard interactive" login isn't actually interactive, the tool just reads a password and tries to use it for both interactive and non-interactive password login. I'll see about using the keyboard interactive login API to allow you to make it actually interactive (so that e.g. you can wait for 2-factor) on Monday. If you want to take a crack at it, the relevant code is in:
Instead of passing in a password read from stdin, we'd need to present an interactive REPL using the AuthenticationPrompt
handler.
Ah that makes sense. I'll give it a try. Thanks!
When attempting to connect to a server which requires keyboard interactive authentication the following error occurs: