Auto recolor & rename tab after login in a remote server to aviod to mistake operations on some important servers
update ~/.ssh/config
for hostname alias and priority identified
Host d01
HostName 192.168.100.11
Port 22
User root
IdentityFile ~/data/keys/mykey
Host dev-n01
HostName 172.16.30.101
Port 22
User root
IdentityFile ~/data/keys/mykey
Without oh-my-zsh
:
put iterm2-ssh.plugin.zsh
in any place like ~/.plugins
,
append fllowing line in your ~/.zshrc
:
source ~/.plugins/iterm2-ssh.plugin.zsh
With oh-my-zsh
:
put the plugin file under ~/.oh-my-zsh/custome/plugins/iterm2-ssh/
,
and append iterm2-ssh in the constant plugins
defined in ~/.zshrc
:
...
plugins=(iterm2-ssh)
...
exec $SHELL