SFTP login with key file

Sure!

The URL should be:

http://ec2-52-26-38-55.us-west-2.compute.amazonaws.com/

Maybe http:// part breaks everything? I’m not sure you can access to SSH via http.

I wondered that, but Cyberduck is happy with the same config. Also, the error message comes up instantly, suggesting it is failing to initiate a connection attempt with the server rather than the server rejecting the connection.

Figured out part of it. The trick is to remove the HTTP:// prefix. It should read: ec2-52-26… etc.

I now get a new error message saying my key file is invalid: " Unrecognized private key format’"

That very same file (.ppk) is used by CyberDuck.

Any doc on what this file should look like for Komodo?

Just because Cyberduck accepts something it doesn’t mean other apps will. Can you try connecting to that server using the key you provide to Komodo through your command like? ie. something like ssh -i /keyfile user@hostname

Well, the command line uses a .PEM key instead of a .PPK key, but with that switch, it works fine.

[Side note: if I point Komodo to the PEM, I get an error message “no such file”.]

*.ppk is a Putty key. I’m not sure how CyberDuck handles that but with Komodo you need to make sure you’re key is added in Pageant. Komodo will then automatically use that.

  • Carey

OK, finally got it to work. Here’s the checklist of hurdles I had to overcome:

  • Hostname must have no protocol qualifier (HTTP etc). So it should be simply: “xyz.domain.com
  • Hostname must have no trailing “/”
  • Go to the command line and run ‘ssh-add xyz.ppk’
  • Ignore the Browse option for specifying a file.
  • The default path should have no leading “/”

It would be nice if Komodo enforced these requirements :smile:

What’s Pageant?

Pageant is the SSH-agent for PuTTY.
http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter9.html

  • Carey

OK, I tried that a while back, and didn’t realize it had worked due to other issues. Is my checklist correct now, for other users?

Makes sense that we should check this to save people from using the wrong protocol who may not understand what they mean.

That’s a pain. This should be handled by the connection tool. Def need to see whats up there. It shouldn’t matter that you’ve added a “/”.

I don’t know what you mean by this.

This isn’t true, or at least I’m not able to reproduce an issue when adding “/” to the start of a path. That’s a bug if it’s not letting you specify the root directory.

I’ll file a couple enhancement requests based on your experience.

  • Carey

EDIT:

This is an alternative to using the Server Prefs key field. This is how you used to have to do it in Komodo. I think there might be an issue with Komodo and PPK files.

@rwforsythe
Is you’re key password protected by any chance?

  • carey

I think there might be a blank password, but nothing that has caused a problem elsewhere.

By “ignore the browse”, I mean that the UI looks like you point Komodo to the PPK file and go from there. Which is what CyberDuck does, for example. But it seems that that won’t get you anywhere with Komodo, it’s a red herring. Instead you need to do the ssh-add thing. Or go elsewhere in the Komodo UI. Browse shouldn’t be enabled for SFTP, I’d say.

That would defeat the purpose of that field. SFTP is when you need that field. I’ve had issues in other programs that barfed on PuTTY generated keys (same error you got about formatting) as they have a different format from ssh-keygen generated keys. The proper fix will be to figure out why Komodo can’t figure out how to use a PPK format key.

Just to clarify…I’ve been assuming you generated the key using PuTTY. Is that true or did Amazon provide a PPK file?

  • Carey

Amazon provided the PPK, and I ran ssh-add. currently the profile has no URL in that PPK url field.

If it’s supposed to read the file and only falls back to the Pageant thing, that’s an issue of course!

No that’s fine. You don’t HAVE to specify a key in the prefs. I don’t know off the top of my head what order they are used but I assume it’s the key in the prefs, then it checks to see if there is a valid key save in a SSH agent session or a Pageant session.

Are you comfortable cutting your private key out of the PPK file (add filler where it was) you got from Amazon generated then mailing it to me?

  • Carey

FYI here are the enhancement requests:
Hostname validation: https://github.com/Komodo/KomodoEdit/issues/917
Key specify issues: https://github.com/Komodo/KomodoEdit/issues/918

  • Carey

I checked this item. Remote folder not working with my pub and private keys

Hi @websofter,

I don’t think you read the thread. SFTP is working there were just some hurtles to overcome to get it to work. I’d suggest you start a new threat and provide some details about what issue you’re having. I just confirmed for myself that SFTP works fine.

  • Carey