ITerm2 for mac configure Clone session function
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