diff --git a/sshto-1.0/ChangeLog b/sshto-1.0/ChangeLog new file mode 100644 index 0000000..7455df2 --- /dev/null +++ b/sshto-1.0/ChangeLog @@ -0,0 +1,2 @@ +1.0: +* Initial release. diff --git a/sshto-1.0/FAQ b/sshto-1.0/FAQ new file mode 100644 index 0000000..ccef9f3 --- /dev/null +++ b/sshto-1.0/FAQ @@ -0,0 +1,12 @@ +Q: Why do i need this? +A: When you've got a lot of servers in your ~/.ssh/config file + and can't even remember all of them. + +Q: Hot it works? +A: Script greps data from multiple config files via pattername 'config*' in ~/.ssh dir. + And buld s a menu (via dialog) from this data. + +Q: Can i change colors? +A: You can customize dialog colors by creating a config file: + dialog --create-rc ~/.dialogrc + And edit it with any text editor. diff --git a/sshto-1.0/debian/changelog b/sshto-1.0/debian/changelog new file mode 100644 index 0000000..4f89f09 --- /dev/null +++ b/sshto-1.0/debian/changelog @@ -0,0 +1,5 @@ +sshto (1.0-1) unstable; urgency=low + + * Initial release. Closes: #636016. + + -- Ivan Marov Wed, 18 Sep 2019 12:46:24 +0300 diff --git a/sshto-1.0/debian/compat b/sshto-1.0/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/sshto-1.0/debian/compat @@ -0,0 +1 @@ +10 diff --git a/sshto-1.0/debian/control b/sshto-1.0/debian/control new file mode 100644 index 0000000..e7c7b50 --- /dev/null +++ b/sshto-1.0/debian/control @@ -0,0 +1,15 @@ +Source: sshto +Maintainer: Ivan Marov +Section: misc +Priority: optional +Standards-Version: 3.9.8 +Vcs-Git: https://github.com/vaniacer/sshto.git +Vcs-Browser: https://github.com/vaniacer/sshto +Homepage: https://github.com/vaniacer/sshto + +Package: sshto +Depends: ${dialog:Depends} +Architecture: all +Description: Small bash script to manage your ssh connections. + It builds menu (via dialog) from your ~/.ssh/config. + Can run commands, copy files, tunnel ports and connect. diff --git a/sshto-1.0/debian/copyright b/sshto-1.0/debian/copyright new file mode 100644 index 0000000..f34db83 --- /dev/null +++ b/sshto-1.0/debian/copyright @@ -0,0 +1,14 @@ +Format: http://www.debian.org/doc/copyright-format/1.0 + +Files: * +Copyright: 2019-2020 Ivan Marov +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice + shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED + TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/sshto-1.0/debian/docs b/sshto-1.0/debian/docs new file mode 100644 index 0000000..d6360a1 --- /dev/null +++ b/sshto-1.0/debian/docs @@ -0,0 +1 @@ +FAQ diff --git a/sshto-1.0/debian/install b/sshto-1.0/debian/install new file mode 100644 index 0000000..31fdb06 --- /dev/null +++ b/sshto-1.0/debian/install @@ -0,0 +1 @@ +sshto usr/bin diff --git a/sshto-1.0/debian/manpages b/sshto-1.0/debian/manpages new file mode 100644 index 0000000..459cecc --- /dev/null +++ b/sshto-1.0/debian/manpages @@ -0,0 +1 @@ +sshto.1 diff --git a/sshto-1.0/debian/rules b/sshto-1.0/debian/rules new file mode 100755 index 0000000..cbe925d --- /dev/null +++ b/sshto-1.0/debian/rules @@ -0,0 +1,3 @@ +#!/usr/bin/make -f +%: + dh $@ diff --git a/sshto-1.0/debian/source/format b/sshto-1.0/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/sshto-1.0/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/sshto-1.0/debian/source/options b/sshto-1.0/debian/source/options new file mode 100644 index 0000000..7423a2d --- /dev/null +++ b/sshto-1.0/debian/source/options @@ -0,0 +1 @@ +single-debian-patch diff --git a/sshto-1.0/sshto b/sshto-1.0/sshto new file mode 120000 index 0000000..2d65a65 --- /dev/null +++ b/sshto-1.0/sshto @@ -0,0 +1 @@ +../sshto \ No newline at end of file diff --git a/sshto-1.0/sshto.1 b/sshto-1.0/sshto.1 new file mode 100644 index 0000000..dd7e22b --- /dev/null +++ b/sshto-1.0/sshto.1 @@ -0,0 +1,86 @@ +.TH "sshto-1.0" "1" "September 2019" "sshto-1.0" "User manual" +.SH NAME +sshto-1.0 \- BASH script to manage your ssh connections. +.SH DESCRIPTION +.nf +It builds menu (via dialog) from your ~/.ssh/config. +Can run commands, copy files, tunnel ports and connect. +Your commands can be easily added to the commands list. +Just edit this part of the script: + +cmdlist_renew () { cmdlist=( + #Command# #Description# + "ls -la" "List Files" + "free -h" "Show free memory" + "df -ih" "Show free inodes" + "df -h" "Show free disk space" + '' '' + "Info" "Full system info" + "Sshkey" "Add my ssh key to $target" + "Alias" "Add my usefull aliases to $target" + "Copy" "Copy selected file or dir to $target" + '' '' + "Upload" "Upload file or folder from $PWD to $target:$DEST" + "Dest" "Change destination folder $DEST on $target" + "Download" "Download file or folder from $target:$DEST to $PWD" + '' '' + "Local" "Change local port $LOCAL" + "Remote" "Change remote port $REMOTE" + "Tunnel" "Start portunneling from $target port $REMOTE to local port $LOCAL" +); } + +Or override this list and $LOCAL|$REMOTE|$timer|$DEST vars in confile ~/.sshtorc + +First collumn - command, second - description. +Simple commands like 'ls \-la' can be added as is. +A list of commands or a complicated logic better add via function. +Empty string is used as a delimiter. + +You can add hosts description(in ~/.ssh/config) like this: +Host server1 #DESCRIPTION +HostName 192.168.0.1 +Port 22 +User admin + +You can add menu delimiters(in ~/.ssh/config) like this: +#Host DUMMY #TEXT# + +You can customize dialog colors by creating a config file: +dialog \-\-create-rc ~/.dialogrc + +.B SSH config exampple +#Host DUMMY #Rybinsk# + +Host rybserver1 #First server +HostName 192.168.0.1 +Port 22 +User user + +Host rybserver2 #Second server +HostName 192.168.0.2 +Port 222 +User user + +Host rybserver3 #Third server +HostName 192.168.0.3 +User user + +#Host DUMMY #Moscow# + +Host moserver1 #First server +HostName 192.169.0.1 +Port 22 +User admin + +Host moserver2 #Second server +HostName 192.169.0.2 +User admin + +Host moserver3 #Third server +HostName 192.169.0.3 +User admin + +.SH AUTHOR +Ivan Marov +.SH GITHUB +https://github.com/vaniacer/sshto