GitHub - vaniacer/sshto: Small bash script to manage your ssh connections. It builds menu (via dialog) from your ~/.ssh/config. It can not only connect but also to run commands, copy files, tunnel ports. · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
vaniacer
sshto
Public
Uh oh!
There was an error while loading. Please reload this page.
Notifications<br>You must be signed in to change notification settings
Fork<br>64
Star<br>632
master
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>227 Commits<br>227 Commits
.github
.github
.gitignore
.gitignore
LICENSE.md
LICENSE.md
README.md
README.md
sshto
sshto
View all files
Repository files navigation
sshto
Feel free to support the project!)
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:
Your commands can be easily added to this list. Just edit this part of the script:
cmdlist=(<br>#Command# #Description#<br>"${slct[@]}" #De/Select command<br>"Username" "Change ssh username to \Z1$GUEST\Z0"<br>"Add tab" "Add terminal tab with \Z1sshto\Z0 for \Z4$target\Z0"<br>"Ssh tab" "Add terminal tab with \Z1ssh\Z0 to \Z4$target\Z0"<br>'' ''<br>"ls -lah" "List Files"<br>"free -h" "Show free memory"<br>"df -ih" "Show free inodes"<br>"df -h" "Show free disk space"<br>"Custom" "Run custom command on \Z4$target\Z0"<br>"Script" "Run custom script on \Z4$target\Z0"<br>'' ''<br>'Yes' "Say 'yes' to SSH"<br>"Info" "Full system info"<br>'Fix_id' "Update host in known_hosts"<br>"Sshkey" "Add my ssh key to \Z4$target\Z0"<br>"Alias" "Add my useful aliases to \Z4$target\Z0"<br>"Copy" "Copy selected file or dir to \Z4$target\Z0"<br>'' ''<br>"Home" "Change home folder \Z4$home\Z0 on local server"<br>"Dest" "Change destination folder \Z4$DEST\Z0 on \Z4$target\Z0"<br>"Upload" "Upload file or folder from \Z4$home\Z0 to \Z4$target:${DEST}\Z0"<br>"Download" "Download file or folder from \Z4$target:${DEST}\Z0 to \Z4$home\Z0"<br>"Mount" "Mount remote folder \Z4$target:$DEST\Z0 to \Z4$home\Z0"<br>"Unmount" "Unmount remote folder \Z4$target:$DEST\Z0 from \Z4$home\Z0"<br>'' ''<br>"Local" "Change local port \Z1$LOCAL\Z0"<br>"Remote" "Change remote port \Z1$REMOTE\Z0"<br>"Tunnel" "Start portunneling from \Z4$target:$REMOTE\Z0 to \Z4localhost:$LOCAL\Z0"<br>'' ''<br>"ShowConf" "Show ssh config for this host"<br>"EditConf" "Edit ssh config for this host"
First collumn - command, second - description.
Simple commands like ls -la could be added as is.
A list of commands or a complicated logic should be added via function.
Empty values('') could be used as a delimiter.
You can quick jump to the selected server via CONNECT button.
To close ssh session press CTRL+D or run exit command, it'll bring you back to sshto commands section.
Optional hosts description could be added like this:
Host server1 #Description, it could be more than one word<br>HostName 192.168.0.1<br>Port 22<br>User admin
Optional start menu delimiters '---{ Group Name }---' could be added like this:
#Host DUMMY #Group Name#
If you are unhappy with this 'DUMMY' group name template, or you actually have a host named 'dummy',<br>you can change this template by ajusting this variable group_id=dummy.
All these additions won't break your ssh configs coz they are considered as comments.
~/.ssh/config example:
#Host DUMMY #Rybinsk#
Host rybserver1 #First server<br>HostName localhost
Host rybserver2 #Second server<br>HostName localhost
Host rybserver3 #Third server<br>HostName localhost
#Host DUMMY #Moscow#
Host moserver1 #First server<br>HostName localhost
Host moserver2 #Second server<br>HostName localhost
Host moserver3 #Third server<br>HostName localhost
Script greps data from multiple config files via pattername config* in ~/.ssh dir.
So you can split config to multiple files and use them with Include directive, example:
Include config_moscow<br>Include config_rybinsk<br>Include config*
All preset variables and functions could be tweaked via ~/.sshtorc config file:
echo "REMOTE=9000 # Remote port for tunneling." >> ~/.sshtorc
You can customize dialog itself a bit by creating and editing its config file:
dialog...