有没有什么办法可以"正常地"重新获得对它的管理。(虽然可以ssh -D 7070 account@server 之后提示已经登录然后重新登录。)bigsun 写了:killall ssh
或者其中'ssh -qTfnN -i /path/id_rsa -D 7070 acount@server'照抄起动时的命令.#!/bin/bash
#Find the PID of the ssh tunnel in the background and assign it to a variable
PID=$(ps -eo pid,args | grep 'ssh -qTfnN -i /path/id_rsa -D 7070 acount@server' | grep -v 'grep' | cut -c1-6)
#kill the tunnel
kill -9 $PID
如何断开ssh连接
- link307
- 帖子: 98
- 注册时间: 2011-06-13 19:29