Multi Commander Support Forum

Multi Commander => Support and Feedback => Topic started by: Timur Born on September 01, 2025, 17:01:51

Title: SFTP connection without SSH key password fails
Post by: Timur Born on September 01, 2025, 17:01:51
Hello.

I am trying to setup a SFTP connection with a public/private keypair that does *not* use a key password. Unfortunately MC insists on asking me for a password and then claims that the empty password failed.

Quote
Ask for password for keyfile failed - Aborting...
Title: Re: SFTP connection without SSH key password fails
Post by: Mathias (Author) on September 01, 2025, 17:56:35
Not sure that can be changed.  MC is using 3rd party library for the SSH. So MC do not have full control over everything
Title: Re: SFTP connection without SSH key password fails
Post by: Timur Born on September 01, 2025, 21:39:01
Thanks for the quick answer. Problem is that I cannot just easily change the private key to include a password for my Oracle VM. WinSCP, Double Commander and Total Commander all work without a password for the private key (just left empty). When the password is left empty in MC then it popups up a pw dialog instead and leaving that empty produces the error I quoted.
Title: Re: SFTP connection without SSH key password fails
Post by: Timur Born on September 01, 2025, 22:08:57
I added a password to the private key file via:

Code: [Select]
ssh-keygen -p -f
But that leads to the following error:

> Failed to authenticate using keyfile : -19

Then I deleted the PW again via the same ssh-keygen command and now MC accepts the empty PW (no popup appears), but this still ends in the same failed authenticate error message.
Title: Re: SFTP connection without SSH key password fails
Post by: Timur Born on September 01, 2025, 22:12:59
I also tried MuCommander and that worked, too.

The failed password message seems to always happen when MC opens the PW popup, regardless of whether the key file's PW is empty or not.
Title: Re: SFTP connection without SSH key password fails
Post by: Mathias (Author) on September 01, 2025, 22:15:32
It should send a blank pw to SSH if you just press ok in password dialog. You sure there is not any other error.. Any error in the Log ?
Sure you press OK in the password dialog. the error "Ask for password for keyfile failed - Aborting..." is only outputted to the log if the Ask Password dialog is cancelled
Title: Re: SFTP connection without SSH key password fails
Post by: Mathias (Author) on September 01, 2025, 22:19:26
I added a password to the private key file via:

Code: [Select]
ssh-keygen -p -f
But that leads to the following error:

> Failed to authenticate using keyfile : -19

Then I deleted the PW again via the same ssh-keygen command and now MC accepts the empty PW (no popup appears), but this still ends in the same failed authenticate error message.

-19 = ERROR_PUBLICKEY_UNVERIFIED - The username/public key combination was invalid.
Title: Re: SFTP connection without SSH key password fails
Post by: Timur Born on September 01, 2025, 22:39:44
It's the same public key file and username I successfully used Double Commander. Both WinSCP and MuCommander don't ask for a public keyfile, just the private one and both work with that.
Title: Re: SFTP connection without SSH key password fails
Post by: Mathias (Author) on September 02, 2025, 08:21:06
I dont know what 3rd party ssh library they are using..

But sure you press OK in the ask password  dialog. because "Ask for password for keyfile failed - Aborting..." should only be outputted when canceling it.
I can't really test my self at the moment since I do not have access to any key login.
Title: Re: SFTP connection without SSH key password fails
Post by: Mathias (Author) on September 02, 2025, 09:44:07
I was able to test this.. I do not get a password dialog when having a keyfile that is not protected with password
Title: Re: SFTP connection without SSH key password fails
Post by: Timur Born on September 04, 2025, 00:49:54
The password dialog only happens when I use the .ppk format private keyfile. When I use the OpenSSH keyfile then no password dialog appears (I think after setting and then deleting the PW again), but instead I get the "Failed to authenticate using keyfile : -19" error instead.