-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtiaoban.sh
More file actions
56 lines (53 loc) · 789 Bytes
/
tiaoban.sh
File metadata and controls
56 lines (53 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh
function trapper(){
trap '' 1 2 3 15 20
}
function menu(){
cat<<-END
==============================
1)10.0.0.4
2)10.0.0.5
3)10.0.0.6
4)10.0.0.7
5)10.0.0.88
6)exit
==============================
END
}
function host(){
read -p "请选择要连接的服务器:" A
case "$A" in
1)
ssh -p"22" ${USER}@10.0.0.4
;;
2)
ssh -p"22" ${USER}@10.0.0.5
;;
3)
ssh -p"22" ${USER}@10.0.0.6
;;
4)
ssh -p"22" ${USER}@10.0.0.7
;;
5)
ssh -p"22" ${USER}@10.0.0.88
;;
6)
exit 0
;;
*)
echo "输入数字1-6"
host
;;
esac
}
main(){
while true
do
trapper
clear
menu
host
done
}
main