Sublime SFTP with SSH keys

I've been using Sublime Text 2 for a few months with Windows 7 at work. It's quite nice, maybe I'll write a post about it someday. So, I thought it was time to get my website development environment running on my laptop, which is running Debian 7 (Wheezy).
The server I wanted to connect to uses SSH keys and port knocking. On a side note: I'm still looking for a way to automatically knock the ports before connecting, on the other hand.. maybe I don't need everything done automatically.
Coming from Windows, I had the SSH key in Putty's *.ppk file format. Specifying it in the SFTP config didn't work, so to get it running, here's what I did.
First, you need to install puttygen. It's available in the Debian repositories.
sudo apt-get install puttygen
After you've done that, you can convert the *.ppk into OpenSSH format.
puttygen key.ppk -O private-openssh -o key
 Now, you can add this key to your SSH agent.
sudo ssh-add key
Now you should be set to use Sublime SFTP with that SSH key.

No comments:

Post a Comment