在使用隧道的本地执行一些工作。 然后关闭隧道。 关机的部分让我很困惑。 目前,我有一个糟糕的解决方案。在一个shell中,我运行以下命令来创建隧道: # Create the tunnel - this works!It runs forever, until the shell is quit.
ssh -nNT -L 50000:localhost:3306 jm@sampledomain.com 然后,在另一个shell窗口中,我做我的工作: # Do some MySQL stu
假设您使用本地emacs (从M-x shell开始)的远程服务器。如果您执行的进程花费的时间太长(例如,一个包含大量文件的目录中的ls ),您希望停止该进程(在终端中使用control-c)。我试过C-c C-c,但那会杀死整个外壳.我如何才能杀死远程服务器上正在运行的进程,而不是整个shell?更新1) M-x shell (execute on local machine)
2) ssh mylogin@myremotemachine.foo.bar (execute on local