Duplicate ssh session
* * * * ½ 2 votos
June 11th, 2007 mysurface Posted in Admin, ssh | Hits: 14782 |
If you are using secureCRT or ssh client, you may discovered that duplicate a ssh session you do not need to login again. That is convenient and fast!
I can do that with ssh command by just adding 2 lines shown as bellow into /etc/ssh/ssh_config
(Thanks to Geek00L)
ControlMaster auto
ControlPath ~/.ssh/socket-%r@%h:%p
You have to login for the first time, the first session will initiate a Control Master by creating a file at ~/.ssh indicate the login name, host and port. After that you can duplicate a ssh session by just execute a ssh command the same way you did for the first login, but this time password is not required.
Cool isn’t it?
ï¼»ä¸æ–‡ç¿»è¯‘ï¼½
Live Chat!









June 15th, 2007 at 2:17 pm
I tried on your solution. It works for OpenSSH 4.3 (CentOS 5) but it doesn’t work for OpenSSH 3.6.1 (RHEL 3).
June 15th, 2007 at 11:34 pm
Wing Loon:
You are right, OpenSSH 3.6.1 doesn’t have
ControlMaster autoOnly yes or not, it happens to RHEL 4 too.
June 16th, 2007 at 1:34 pm
Only OpenSSH 4.0 above have ControlMaster support
Please read this article below: -
http://www.linux.com/article.pl?sid=06/05/19/145227
June 17th, 2007 at 12:05 am
Really nice tip Geek00L , thnx