Small bash script that builds a menu (via dialog) from your ~/.ssh/config.
Allows you to connect to your servers or run commands from menu. Available commands:
cmdlist=( #Command# #Description# "ls -la" "List Files." "free -m" "Show free ram." "df -ih" "Show free inodes." "df -h" "Show free disk space." "top -n1" "Show summary system information." "" "" "info" "Full system info." "copy" "Copy selected file or dir." "sshkey" "Add my ssh key to this server." "alias" "Add my usefull aliases to this server." )
Your commands can be easily added to this list.
First collumn - command, second - description.
Empty string is used as a delimiter.
You can quick jump to the selected server via CONNECT button.
When you done press ^D it'll bring you back to sshto commands section.
Hosts description needs to be added like this:
Host server1 #DESCRIPTION HostName 192.168.0.1 Port 22 User admin
Start menu delimiters '---{ TEXT }---' can be added like this:
#Host DUMMY #TEXT#
~/.ssh/config example:
#Host DUMMY #Rybinsk# Host server1 #First server HostName 192.168.0.1 Port 22 User admin Host server2 #Second server HostName 192.168.0.2 Port 22 User user Host server3 #Third server HostName 192.168.0.3 Port 22 User loser #Host DUMMY #Moscow# Host server1 #First server HostName 192.168.1.1 Port 22 User admin Host server2 #Second server HostName 192.168.1.2 Port 22 User user Host server3 #Third server HostName 192.168.1.3 Port 22 User loser
Include directive also supported. But included config files have to be in ~/.ssh dir, and start from 'config', example:
Include config_*