Alec the Geek

or “My big fat geek’s blogging”

Putty — what a cool tool

Previously, like probably 80% of other users, I had only used Putty as a ssh enabled terminal emulator. However after my adventures with emacs I’ve come to realise what a great tool it is, including it’s support for comand line use.

If you are stuck using Windows without OpenSSH (e.g. not using Cygwin) then I recommend you get Putty.

 

Some of it’s features are:

  • Key generation and management (including import/export of OpenSSH keys)
  • A key caching utility (so you don’t have to keep typing the key passphrase)
  • command line ssh support vi plink
  • support for scp and sftp (pscp and psftp)

Every time I’ve used it it’s been rock solid and handled everything thrown at it (including things that OpenSSH had trouble with — although to be fair that was probably not OpenSSH’s fault)

15 May 2008 Posted by Alec | Windows, Work Practices | | No Comments

emacs Tramp on Windows

I am using emacs with the tramp extension to edit files on a remote server using ssh. I had to pull in various hacks to get it to work so I hope these notes might help others.

(Update 19/May/08 — I have had some serious problems making this work realibly, if you need this type of feature I suggest you look at jEdit with the ftp plugin)

There are also other free of cost options you may care to consider first:

  1. Vim has a netrw plugin
  2. Both FileZilla and WinSCP have options to edit a file from the remote file system which then invokes a local Windows editor of your choice.
  3. jEdit has an ftp plugin that supports sftp and bookmarks

Now for emacs

  1. Install Emacs for Windows and Cygwin with OpenSSH
  2. Upgrade emacs Tramp to the latest version (in particular ensure that –with-lispdir and –infodir options are set correctly when running configure)
  3. At the Cygwin bash prompt test ssh connection to your host
  4. Generate public/private keys and upload to the host
  5. Test ssh again to see if public authentication works (it did not for me because it had been disabled by the UNIX admin)
  6. Configure emacs to use tramp
  7. Start emacs and test connection using cygwin ssh/scp/sftp. If it works skip to step 13 (I think the reason it did not work for me was that the remote host displayed a security banner)
  8. Install the Putty program suite
  9. Test the connection using putty
  10. Ensure the Putty install directory is on the system PATH
  11. In emacs visit the host (C-x C-f) using the method ’plink’. If that does not work you are on your own
  12. If the public keys worked in ssh then import your OpenSSH keys into Putty
  13. You should be good to go
  14. Use emacs bookmarks to save you common host locations

YMMV

With many thanks to all the folks on the web who documented their experiences and Michael Albinus on the tramp-devl mailing list.

15 May 2008 Posted by Alec | Open Source Software, Security, Software Development, Work Practices | | 1 Comment