Skip to content

Commit

Permalink
rename package to it's original name sshto
Browse files Browse the repository at this point in the history
  • Loading branch information
vaniacer committed Nov 25, 2019
1 parent 2dc835b commit 409fe16
Show file tree
Hide file tree
Showing 14 changed files with 144 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sshto-1.0/ChangeLog
@@ -0,0 +1,2 @@
1.0:
* Initial release.
12 changes: 12 additions & 0 deletions 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.
5 changes: 5 additions & 0 deletions sshto-1.0/debian/changelog
@@ -0,0 +1,5 @@
sshto (1.0-1) unstable; urgency=low

* Initial release. Closes: #636016.

-- Ivan Marov <ie.marov@gmail.com> Wed, 18 Sep 2019 12:46:24 +0300
1 change: 1 addition & 0 deletions sshto-1.0/debian/compat
@@ -0,0 +1 @@
10
15 changes: 15 additions & 0 deletions sshto-1.0/debian/control
@@ -0,0 +1,15 @@
Source: sshto
Maintainer: Ivan Marov <ie.marov@gmail.com>
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.
14 changes: 14 additions & 0 deletions 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.
1 change: 1 addition & 0 deletions sshto-1.0/debian/docs
@@ -0,0 +1 @@
FAQ
1 change: 1 addition & 0 deletions sshto-1.0/debian/install
@@ -0,0 +1 @@
sshto usr/bin
1 change: 1 addition & 0 deletions sshto-1.0/debian/manpages
@@ -0,0 +1 @@
sshto.1
3 changes: 3 additions & 0 deletions sshto-1.0/debian/rules
@@ -0,0 +1,3 @@
#!/usr/bin/make -f
%:
dh $@
1 change: 1 addition & 0 deletions sshto-1.0/debian/source/format
@@ -0,0 +1 @@
3.0 (quilt)
1 change: 1 addition & 0 deletions sshto-1.0/debian/source/options
@@ -0,0 +1 @@
single-debian-patch
1 change: 1 addition & 0 deletions sshto-1.0/sshto
86 changes: 86 additions & 0 deletions 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 <ie.marov@gmail.com>
.SH GITHUB
https://github.com/vaniacer/sshto

0 comments on commit 409fe16

Please sign in to comment.