Servers-Open Remote File "authentication failed" error, Komodo not using Pageant

Short Summary

I have created “Servers” entry in Preferences using an OpenSSH key for authentication. I have no password (not needed with my key). When I try to open a “Remote File,” I am asked to enter a password (but I don’t have one, not needed), and when I just click “Login” without entering something, I get “Authentication Failed.” I do have a password on my key file.

Steps to Reproduce

(1) Create a “Remote Account” via the “Servers” Preferences:

  • entered
  • [server_name]
  • SFTP
  • [host_name]
  • [user_name]
  • (entered NO PASSWORD, as it is not required for me, since I have my key)
  • OpenSSH key file: (I’ve tried my *.ppk file, and my *.pem file)

(2) File->Open->Remote File.
(3) I am prompted to enter a password. I just click “Login” since I do not have a password.
(4) I receive the window again, prompting me to enter a password. I click “Login” again, or try to just type something, and I receive “Authentication Failed”

Also, this doesn’t appear to use PuTTy, so is there a way to set “agent forwarding” through Komodo?

##Expected results

I see my files on my remote server.

Actual results

“Authentication Failed”. I’m being forced to enter a password, even though one is not required for me to log in.

Platform Information

Komodo Edit or IDE? Komodo Edit
Komodo Version? Version X
Operating System (and version)? Windows 10, Version 1607

Additional Information

I have tried a series of Steps, per a Bug I had opened, Bug #2189. Nothing has worked thus far. Would someone happen to know if there is anything else to check? Or is this truly a bug?

  • Pageant and PuTTy are in my PATH
  • I am able to connect to the server using commandline putty username@server
  • I am able to connect to the server using PuTTy and WinSCP, with no issues
  • I’ve tried both specifying a key, and not specifying a key. Nothing seems to use Pageant
  • I’ve rebooted
  • I’ve deleted and recreated the Server configuration
  • I’ve tried in Komodo 8, 9, 10
  • Nothing works. I still continue to be prompted for a password (which I don’t have, because I don’t need one).

Thank you!

@prplpanther, something else you could try is opening Tools > Run Command then run where pageant. I’m not sure how you’ve added the putty tools to your PATH but it’s possible to add it to your path in one context and it be gone in another context.

Anyone else have some insite on this? I’m at a loss. It’s working fine for me.

  • Carey

Hi @careyh !

Komodo does see pageant when I run where pageant. To be clear, are you on Windows itself, where you are having no issue? Or are you having no issue on another OS?

I explicitly added to the PATH environment variable yesterday (as I just unzipped and placed the putty/pageant files into a directory). Today, I actually ran the MSI thinking that maybe Komodo is relying on some registry setting. Still, even with that reinstalled with the MSI, and Komodo clearly finding it (by running where pageant), I am still being prompted for a password.

I do find it difficult to believe that there is something crazy in my Windows configuration that is preventing this from just connecting, especially when every other program I use that connects via Pageant have no issues.

Thanks for your help! I’d love to know if you are testing this on Windows or another OS. Maybe it works for another OS, but just not Windows?

Hey @prplpanther,

Yes I’m testing on Windows 10.

I don’t find it that difficult to believe. It happens all the time with software. Also, I can’t reproduce this issue and no one else has reported it so far so that leads me to believe there is something wrong with your setup though it sounds like everything is where it should be.

Thanks for trying that. I was going to suggest it.

I just confirmed that it’s working for me in Edit. I hadn’t noticed you were using Edit but I was testing in IDE.

Could you try Help > Troubleshooting > Restart in Safe-Mode and try the connection setup again.

  • Carey

Since the OP’s problem was with Edit which I don’t use, I didn’t chip in But now that caryh has indicated the same behavior should be shown by IDE if it’s a Komodo issue, I just want to confirm that although I seem to have pretty much the same setup as the OP in Komodo Edit X 10.1.1, build 89474, also running on Windows 10 version 1067, I have no problems getting connections to remote ssh servers,authenticating by public keys stored in Pageant.

But I note from the log snippet posted by the OP on the bug tracker that the remote server was complaining that the public key submitted for authentication was in an invalid format. This would explain why the OP gets a password challenge, because that’s how sshd responds when a public key authentication fails. It issues a password challenge – even if sshd is configured not to accept password logins from the user concerned – which Komodo than duly passes on to the local user, even though the challege is doomed to fail.

In reposting here at the suggestion of the developer who responded to the bug report, the OP repeated unchanged info from the bug report about the data entered into the Remote Account Creation dialogue. Two items there strike me as problematic. First off, I suspect entering NO PASSWORD as a literal string into the password field might cause Komodo to respond with that “password”, which wouldn’t help. In my (working) server connection settings, I have always left the password field blank. But more importantly, the legend above the field for a key file bears the legend “Specify an OpenSSH key file for authentication”. The OP indicates that he tried pointing to a putty *.ppk and *.pem file; but those aren’t in OpenSSH keyfile format, so it’s not surprising that they didn’t work. However, entering them here will result in Komodo duly sending them to the server – and having them rejected, causing the fallback to a password challenge. Thus configured, pageant won’t be invoked at all. whether it’s in the user’s path or not.

To use Pageant (and keys in putty’s format) it’s necessary to have Pageant running, with the required keys loaded, before starting up Komodo. Then the field for a OpenSSH key in Komodo’s server config dialogue needs to be left completely blank (like the password field). With that field left blank, provided Pageant is running in the background with the necessary key(s) loaded (which can be verified by right clicking the Pageant icon on the task bar) Komodo will correctly hand off the key exchange to pageant, and the connection will succeed.

This leaves open the question as to why the Komodo developers don’t “teach” Komodo to handle keys in *.ppk format. If that was done, we could indeed enter the path to that *.ppk key into the server configuration dialogue. ISTR that in an earlier version (?8) the docs at first claimed this was possible, but then that was corrected and *.ppk key handling was roadmapped for a later version, though it’s never arrived (though my memory may be wrong there). But anyway, leaving the password AND key fields blank and making sure pageant is running in the background with the required key(s) loaded should do the trick.

FWIW, I just now experimentally altered one of my server config dialogues to attempt to use the *ppk format key which is actually loaded and working in pageant. When I then tried to retrieve a remote file from that server, I got the same outcome as the OP, viz no connection and a useless password challenge. Deleteing the contents of the key dialogue in Komodo’s server config restored things to normal.

@baldowl, this basically covers everything we’ve tried for @prplpanther to-date. It’s a great summary and explanation. You are correct on all points.

The only thing I can comment on/confirm is that no, *.ppk files are still not supported when using the Specify an OpenSSH key file for authentication field . Yes there is a ticket open for it. Yes it will get done, but it’s not priority. With existing docs and functionality it connections can already be made.

@prplpanther, apologies to you. This must just be incredibly frustrating. If you’re still willing, after you’ve tried Restarting in Safe-mode, I would get you to enable debug logging to see if we can get a clue as to whats happening.

  • Carey

Hi @baldowl and @careyh… I have tried restarting in Safe Mode for Komodo, per @careyh’s suggestion. I still get the error:

[2016-12-05 15:22:00,569] [WARNING] koSFTPConnection: do_authenticateWithPassword:: SSHException: Incompatible ssh peer (no acceptable kex algorithm)
[2016-12-05 15:22:00,569] [WARNING] koSFTPConnection: SSH error: Invalid username/password

I’ve looked at my path, I’ve poked around the Putty Kex settings, I just can’t find anything wrong. A way I have been able to sort-of work around it, is to use Bitvise and create an FTP-.SFTP Bridge and open a Tunnel. Then, I am using the FTP setting in Komodo to point to the listening FTP port set up in Bitvise, and then Bitvise is using Pageant to connect via SFTP. Not a pretty work-around, but I am able to access the desired remote server this way.

I’m happy to turn on any debugging to help isolate the issue. Just let me know what to do.

Thanks!

Wait, I missed that in your original post, but @baldowl mentioned it. I didn’t think you had actually done it but…did you literally type NO PASSWORD in the password field? If you did, delete it. Komodo thinks you’re giving it a password of NO PASSWORD.

Thanks @baldowl for reading more thoroughly than moi!

  • Carey

@prplpanther, just to be sure… Did you actually try doing what I suggested, namely leaving both the password and the key fields blank in the remote server config dialogue, while making sure that pageant is running? That was all it’s ever taken for me in three years’ or so of working with remote files in Komodo to get ssh connections working.