Live Chat!

Duplicate ssh session

2 votos Vota!!

June 11th, 2007 mysurface Posted in Admin, ssh | Hits: 18709 |

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?

[中文翻译]

4 Responses to “Duplicate ssh session”

  1. Siew, Wing Loon Says:

    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).

  2. Wing Loon:
    You are right, OpenSSH 3.6.1 doesn’t have

    ControlMaster auto

    Only yes or not, it happens to RHEL 4 too.

  3. Siew, Wing Loon Says:

    Only OpenSSH 4.0 above have ControlMaster support

    Please read this article below: -

    http://www.linux.com/article.pl?sid=06/05/19/145227

  4. Really nice tip Geek00L , thnx

Leave a Reply

Security Code: