Get the App
SLTechnology News&Howtos  ›  Servers  › 

ITerm2 for mac configure Clone session function

Shulou Source: shulou.com Published: 2022-06-02 05:29:15 10月03日 Update

Re-select iTerm2 as the terminal tool under mac

It is found that there is no clone session function similar to SecureCRT by default.

The search engine found a solution, sorted out as follows:

0 Open Preference-> Profiles-> General-> Working Directory-> tick Reuse previous session's directory

0 Edit the local mac ~ / .ssh / config file, add the following, and save and exit:

Host * ControlMaster autoControlPath ~ / .ssh / master-%r@%h:%p

0 logs in to the corresponding machine for the first time, such as the jumping machine, and the corresponding socket file, such as master-$user@$ip:$port, will be generated in the ~ / .ssh directory.

If you log in again, you do not need to enter a password.

0 for convenience, you can add an alias.

Echo "alias jump='ssh xxx@192.168.x.x'" > > ~ / .bash_profilesource ~ / .bash_profile

P.s. If you are using zsh, add it to ~ / .zshrc

Tags: Files functions content again passwords tools engines search engines methods machines directories terminals springboards secondary login search generation login input selection configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Shulou Information Apple Linux Shulou Tech Info