|
This article has been written with emacs NT version 23.
I love to login to other machines with an emacs shell. Combining shell output, shell input and editing text files by copying and pasting text blocks between these three sources is very powerfull. With emacs this can all be done with the keyboard alone. Because I don't need the mouse I can save time because the keyboard for moving text around is much faster than doing this between by conventional text selections with the mouse.
There are several emacs shells, they can be opened with the emacs commands eshell, ansi-term and shell. A long time ago I used to open remote shells with the emacs telnet command but telnet connections have disappeared now. Instead connections now mostly use ssh.
The ansi-term command is the best command to open a remote ssh shell. Unfortunately I could not get this working. I read that on MS-Windows ansi-term only seems to work when emacs is downloaded and installed along with cygwin.
I managed to open ssh shells in emacs from eshell and shell buffers. I found shell buffers a bit better than eshell buffers.
To start a ssh connection from emacs I first open a shell with Alt-x shell. Then I invoke the following command in the shell buffer:
plink myaccount@myremotecomputer bash -i
I save myself the trouble of typing in passwords by putting my public key in .ssh/authorized_keys on the remote machine and registering my secret key in Pageant. Apart from being convenient password-less logins might be required for remote shells within emacs.
Note May 2011
Lately I tried this again with emacs 23.2.1. I managed to open an ssh shell by first opening a file on the remote system via ssh within Emacs. Then I did Meta-x shell in the resulting remote editing buffer. As before I am using password-less logins.
|