Assume you work on a remote server from a local emacs shell (started with M-x shell
). If you execute a process which takes too long (for example an ls
in a directory with a huge amount of files), you would like to stop that process (in the terminal one would use control-c
). I tried C-c C-c
but that kills the whole shell... How can I only kill the running process on the remote server and not the whole shell?
Update
Step-by-step:
1) M-x shell (execute on local machine)
2) ssh mylogin@myremotemachine.foo.bar (execute on local machine)
3) sleep 60 (execute on remote machine)
4) C-c C-c (execute in the current shell)
=> instead of still being on the remote host and just the sleep command being killed, the whole remote connection is closed and you are on your local machine again.