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
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.
15 May 2008
Posted by
Alec |
Open Source Software, Security, Software Development, Work Practices |
|
1 Comment