File tree Expand file tree Collapse file tree 3 files changed +46
-73
lines changed Expand file tree Collapse file tree 3 files changed +46
-73
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ # Iterm2-ssh
2
+ for mac iterm2
3
+ auto re-color & re-name tab when ssh to a remote server
4
+ aviod to mistake operations on some important servers
5
+
6
+ ## Steps
7
+ #### 1. Config your host
8
+ update ~ /.ssh/config for hostname alias and priority identified
9
+
10
+ ``` bash
11
+ Host d01
12
+ HostName 192.168.100.11
13
+ Port 22
14
+ User root
15
+ IdentityFile ~ /data/keys/mykey
16
+
17
+ Host dev-n01
18
+ HostName 172.16.30.101
19
+ Port 22
20
+ User root
21
+ IdentityFile ~ /data/keys/mykey
22
+ ```
23
+
24
+ #### 2. Enable the plugin
25
+
26
+ ##### Without ` oh-my-zsh ` :
27
+ put ` iterm2-ssh.plugin.zsh ` in any place like ` ~/.plugins ` ,
28
+ append fllowing line in your ` ~/.zshrc ` :
29
+ ``` sh
30
+ source ~ /.plugins/iterm2-ssh.plugin.zsh
31
+ ```
32
+
33
+ ##### With ` oh-my-zsh ` :
34
+ put the plugin file under ` ~/.oh-my-zsh/custome/plugins/iterm2-ssh/ ` ,
35
+ and append __ iterm2-ssh__ in the constant ` plugins ` defined in ` ~/.zshrc ` :
36
+ ``` sh
37
+ ...
38
+ plugins=(git iterm2-ssh)
39
+ ...
40
+ ```
41
+
42
+ #### 4. Restart __ zsh__
43
+
44
+ ``` sh
45
+ exec $SHELL
46
+ ```
File renamed without changes.
You can’t perform that action at this time.
0 commit comments