-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGUI_Servers_Connections
82 lines (66 loc) · 1.45 KB
/
GUI_Servers_Connections
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Программка для быстрого подключения к серверам.
-----------------------------------------------------------------
#!/bin/bash
# clear the screen
tput clear
# Move cursor to screen location X,Y (top left is 0,0)
tput cup 3 15
# Set a foreground colour using ANSI escape
tput setaf 1
echo "GUI Servers connections"
tput sgr0
tput cup 5 15
# Set reverse video mode
tput rev
tput setaf 1
echo "W-I-N-D-O-W-S |#|#| S-E-R-V-E-R-S"
tput sgr0
tput setaf 1
tput cup 7 15
echo "1. Windows Server #1"
tput cup 9 15
# Set reverse video mode
tput rev
tput setaf 1
echo "L-I-N-U-X |#|#| S-E-R-V-E-R-S"
tput sgr0
tput setaf 1
tput cup 11 15
echo "2. Linux Server #1"
tput setaf 1
tput cup 13 15
echo "3. Linux Server #2"
tput setaf 1
tput cup 15 15
echo "4. Linux Server #3"
tput cup 17 15
# Set reverse video mode
tput rev
tput setaf 1
echo "F U N C T I O N S"
tput sgr0
tput setaf 1
tput cup 19 15
echo "5. Exit"
# Set bold mode
tput setaf 7
tput bold
tput cup 21 15
read -p "Enter your choice: " choice
tput clear
tput sgr0
tput rc
case "$choice" in
"1") xfreerdp /v:10.10.10.10 /u:admin /p:password /size:97%h
;;
"2") sshpass -p password ssh [email protected]
;;
"3") ssh -i /home/larry/.ssh/larry [email protected]
;;
"4") ssh -i /home/larry/.ssh/larry [email protected]
;;
"5") exit
;;
esac
ln /home/user/scripts/script.sh /home/user/script
bash script