#!/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 root@10.10.10.11 ;; "3") ssh -i /home/larry/.ssh/larry larry@10.10.10.12 ;; "4") ssh -i /home/larry/.ssh/larry larry@10.10.10.13 ;; "5") exit ;; *) echo "Wrong choice... Please try again." show_main_menu ;; esac