Alec the Geek

or “My big fat geek’s blogging”

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

1 Comment »

  1. [...] Andrew G.R. wrote an interesting post today onHere’s a quick excerptI 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. There are also other free of cost options you may care to … [...]

    Pingback by emacs Tramp on Windows | My Geek Solutions | 15 May 2008

Leave a comment