[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Search]

[Emacspeak] Re: running remote shells



prayner--- via Emacspeak <emacspeak(a)emacspeak.org> writes:

> What do people usually use for executing a shell on a remote machine
> these days? My usual setup is to edit files with tramp and ssh to run
> a remote shell. I have been using an ssh mode from Noah Friedman for
> many years but under emacs 27.1 it no longer seems to be automatically
> speaking output. I note there are a few ssh packages in the package
> archives and eshell as well. Before I start experimenting with these I
> am curious to know what others use.
> thanks in advance
> Peter

Hi Peter,

I don't do a lot of remote work anymore. However, when I did, I use to
use a number of different tools depending on what I wanted to do. A lot
depended on how often I was going to interact with the remote system and
what level of interactin I needed. Like you, for remote editing of files
and basic file management, I just use tramp. If I just need to run some
simple scripts or programs which don't need user interaction, I would
often just use M-x shell and just run ssh inside it. If I needed
something a bit more interactive, I would use M-x term as its two modes
(character mode and line mode) can be useful when you need to review
output or interact with a remote program. Sometimes, I would use an ssh
tunnel so that I could run client programs locally, but have them access
remote resources while avoiding firewall issues.

Note also that tramp can be used to run remote commands, not just edit
files and get directory listings. I did this at one time when I was
doing a lot of development work on a remote host. Things were setup so
that tramp would run the remote build tools. This can be quite powerful
as you can setup things so that it is very similar to working locally.
When you run the build tool, tramp executes it on the remote host and
sends back the output, which in turn is passed back to Emacs, allowing
you to do things like jump to the next/previous error when the build has
failed (for example, when compiling remote sources). The downside with
doing this is that it can be a little fragile and painful to get
configured initially. Therefore, the effort can really only be justified
if it is something you going to be doing over an extended period of
time. For more ad hoc interactions, I just fall back to the M-x shell or
M-x term solution.

I've often found the most critical part in getting things to work
smoothly is ensuring your ssh agent and keys are setup correctly.
Tramp works much better if it doesn't have to prompt and wait for
passwords. I also found some Emacs language environments have better
tramp integration than others.


|May 1995 - Last Year|Current Year|


If you have questions about this archive or had problems using it, please contact us.

Contact Info Page