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:
- Vim has a netrw plugin
- 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.
- jEdit has an ftp plugin that supports sftp and bookmarks
Now for emacs
- Install Emacs for Windows and Cygwin with OpenSSH
- Upgrade emacs Tramp to the latest version (in particular ensure that –with-lispdir and –infodir options are set correctly when running configure)
- At the Cygwin bash prompt test ssh connection to your host
- Generate public/private keys and upload to the host
- Test ssh again to see if public authentication works (it did not for me because it had been disabled by the UNIX admin)
- Configure emacs to use tramp
- 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)
- Install the Putty program suite
- Test the connection using putty
- Ensure the Putty install directory is on the system PATH
- In emacs visit the host (C-x C-f) using the method ’plink’. If that does not work you are on your own
- If the public keys worked in ssh then import your OpenSSH keys into Putty
- You should be good to go
- 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.


[...] 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 … [...]