0

i started using the eldritch and mysterious tramp again because a user on here helped me fix it. (thanks michael: tramp runs on odt export --).

i create org mode links to my commonly-used remote conf files. when i click on them my tramp session starts up successfully.

it's possibly a no-brainer, but my question is how can i drop to a shell after i'm done finishing editing my conf file? to like restart a service or similar.

i know i can run shell or eshell and run ssh, but that starts a new connection which is really no different to reaching for the terminal emulator. surely i can magically just shell within my existing tramp connection?

user27075
  • 488
  • 3
  • 11

2 Answers2

2

Invoking M-x shell from a buffer with a remote file name should start a shell on the remote host.

The same thing applies to most commands which start a process.

how can i drop to a shell after i'm done finishing editing my conf file?

It sounds like you simply need to use M-x shell in that conf file's buffer.

phils
  • 48,657
  • 3
  • 76
  • 115
2

M-x shell runs always a new shell asynchronously, which means a new connection. If you just need to run a command on the remote host, consider shell-command. Something like (shell-command "hostname") is an example for this.

Michael Albinus
  • 6,647
  • 14
  • 20