38 Commits

Author SHA1 Message Date
8ab5a13cca exception handling when a session subprocess is interrupted (f.e. ctr+c on password entry) 2024-04-05 14:28:53 +03:00
fc9640a491 Merge branch 'fix-escape-sequence' into 'master'
Fix escape sequence

See merge request zlax/sshch!2
2024-04-05 11:18:39 +00:00
Anton Samofal
8ee868ab69 Fix escape sequence 2024-04-05 11:18:39 +00:00
2c5c87f555 add curses texpad del, home, end handlers 2022-06-17 21:55:01 +03:00
cd501bdc1e add curses texpad Esc handler 2022-06-14 20:36:15 +03:00
37b3926880 merging CMDConnect and CursesConnect into the single Connect function 2022-06-14 12:33:32 +03:00
abb2fcfa4c remove ThreadConnect func and help fixes 2022-06-14 11:52:00 +03:00
7d7e2ff775 py2 curses utf8 display support 2022-06-12 16:20:59 +03:00
eddfedb6c3 parallel command execution for aliases and groups 2022-06-11 11:51:19 +03:00
e11978957f parallel command execution for aliases and groups 2022-06-11 11:46:47 +03:00
032b4b1ab0 Add w/s as navigation 2021-09-22 18:58:18 +03:00
7fa8bdb6f9 Fix -f cmd output 2021-09-22 18:19:17 +03:00
10ca6ad15b Add GroupChildAliases function 2021-09-22 17:39:54 +03:00
48d491312a Add group tree (nested groups) 2021-09-22 16:31:11 +03:00
0bbf06340a Update 'README.md' 2019-09-05 13:42:24 +00:00
ed10aa8f03 add exceptions 2018-11-28 20:46:18 +03:00
0fd4ff9b74 issue 10 fix 2018-11-28 14:30:35 +03:00
a39cd7ae68 interface fixes 2018-11-28 14:27:06 +03:00
ba9fa303ba newlines in readme 2018-04-23 22:23:54 +03:00
1b9acdcc4a first stable release 2018-04-23 22:07:22 +03:00
b7fdcf119d blank password for remove password field 2018-04-22 19:53:12 +03:00
b48081be65 fixed TypeError: must be str, not bytes with python3 2018-04-22 18:10:22 +03:00
32013bdb8d Add home/end handlers, some minor fixes 2018-04-22 15:02:36 +03:00
450b30b196 fixed 'selected' list out of range 2018-04-08 16:27:16 +03:00
8e930115a5 fixed add new group name string 2018-04-08 12:33:27 +03:00
ec8a2ca14a minor fixes 2018-04-08 12:23:29 +03:00
9c361bbe00 removed possibility to create alias and group with spaces 2018-04-08 12:12:04 +03:00
37a20a0c48 add cursor to curses 2018-04-08 11:31:20 +03:00
e430142fdc groups added 2018-04-05 00:31:37 +03:00
c8069554eb Merge pull request #5 from GHPS/ZSH-Completion
Added full ZSH completion
2018-01-20 11:02:54 +03:00
GHPS
6fdcf8ae6d Added full ZSH completion 2018-01-19 16:20:33 +01:00
c528af6414 Merge pull request #4 from GHPS/Better-Scriptability
Better Scriptability by Removing Unnecessary Comma in List Output
2017-11-22 12:15:07 +03:00
GS
9ea667f201 Better Scriptability by Removing Unnecessary Comma in List Output 2017-11-21 21:24:24 +01:00
2c8f072499 Merge pull request #3 from GHPS/master
Added Python 3.x support
2017-11-20 09:57:30 +03:00
GHPS
68bb493c44 Added Python 3.x support 2017-11-19 23:34:25 +01:00
e75a733d0b README fix 2017-09-13 12:05:17 +03:00
c057e1e8ed Adding autocompetion instructions to README and fixing lack of 'exec_string' parameter crashing 2017-09-13 12:03:00 +03:00
0266d29308 Merge pull request #2 from jeff-99/master
added bash autocompletion script for sshch aliases
2017-09-12 20:48:32 +03:00
6 changed files with 679 additions and 206 deletions

21
LICENSE
View File

@@ -4,27 +4,26 @@ sshch is released under the DWTW license
This program is free software; you can redistribute it and/or modify it under the terms of the Do What Thou Wilt License. This program is free software; you can redistribute it and/or modify it under the terms of the Do What Thou Wilt License.
DO WHAT THAU WILT Boundless Public License
DO WHAT THOU WILT
TO PUBLIC LICENSE TO PUBLIC LICENSE
Version 2.5 Version 2.55
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it in full or in part is allowed without any restrictions.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. Do what thou wilt shall be the whole of the Law. 0. Do what thou wilt shall be the whole of the Law.
Anyone is allowed to copy and distribute the copies of this license agreement in whole or in part, as well as modify it without any other limitations. DWTWL a license with a single requirement: DO WHAT THOU WILT
DWTW a license with a single requirement: DO WHAT THOU WILT The license provides more freedom than any other one (such as GPL or BSD) and does not require saving the license text on copying.
The license provides more freedom than any other one (such as GPL or BSD) and does not require saving the license text on copying. DWTWL an accomplished and eligible license for free text, code and any other symbols (including the software, documentation and artwork).
DWTW an accomplished and eligible license for free text (including the software, documentation and artwork). The license does not contain a "no warranty" clause. DWTWL can be used in countries that do not legally acknowledge the transition to public domain.
The license does not contain "no warranty" clause. DWTW can be used in countries that do not legally acknowledge the transition to public domain. Summary:
Summary: An author-creator gives their source code to the world for free, without becoming distracted by worldly thinking regarding how and why the others will use it.
An author-creator gives his or her source code to the world for free, without becoming distracted by worldly thinking regarding how and why the others will use it.

View File

@@ -1,25 +1,49 @@
SSH connection manager with curses interface SSH connection and aliases manager with curses and command line interface
====== ======
sshch is released under DWTWL 2.5 license sshch is released under DWTWL 2.55 license
sshch compatible with pyhon2 and python3, no additional libraries are required
### Screenshot ### Screenshot
![sshch](https://raw.githubusercontent.com/zlaxy/sshch/master/sshch_screenshot.png) ![sshch](https://dev.ussr.win/zlax/sshch/raw/branch/master/sshch_screenshot.png)
### Installing ### Installing
To install for all users: **You can install a release version from pip:**
```bash
pip install sshch
``` ```
**Manual installation from the package or git repository also available:**
To install for all users:
```bash
sudo python setup.py install sudo python setup.py install
``` ```
To install just for current user: To install just for current user:
``` ```bash
mkdir ~/.local/bin mkdir ~/.local/bin
cp sshch/sshch ~/.local/bin/ cp sshch/sshch ~/.local/bin/
``` ```
### Using ### Using
To run curses interface: To run curses interface:
``` ```bash
sshch sshch
``` ```
To run command line help: To run command line help:
``` ```bash
sshch -h sshch -h
``` ```
**If you want to use unsafe 'password' feature you must install 'sshpass' first.** For exit from current ssh session press `Ctrl+D`.
**Additional Features**
- If you want to use unsafe 'password' feature you must install `sshpass` first.
- If you want to use bash autocompletion function with sshch, copy autocompletion script to /etc/bash_completion.d/:
```bash
sudo cp completion/sshch_bash_completion.sh /etc/bash_completion.d/sshch
```
(changes will come into effect with new bash session)
- If you want to use zsh autocompletion:
1) Place File in a Directory where ZSH can find it
-> Search Path is Stored in $fpath
-> echo $fpath
2) Rename File to '_sshch'

View File

@@ -2,7 +2,7 @@ _sshch_complete()
{ {
local cur_word alias_list local cur_word alias_list
cur_word="${COMP_WORDS[COMP_CWORD]}" cur_word="${COMP_WORDS[COMP_CWORD]}"
alias_list=`sshch -l | sed 's/,//g'` alias_list=`sshch -l`
COMPREPLY=($(compgen -W "$alias_list" -- $cur_word)) COMPREPLY=($(compgen -W "$alias_list" -- $cur_word))
return 0 return 0
} }

View File

@@ -0,0 +1,27 @@
#compdef sshch
#
# ZSH Completion for SSHCH
# Usage:
# 1) Place File in a Directory where ZSH can find it
# -> Search Path is Stored in $fpath
# -> echo $fpath
# 2) Rename File to '_sshch'
#
_arguments '::aliasname:->getAlias' \
'-e[Edit Alias]:aliasname:->getAlias' '--edit[Edit Alias]:aliasname:->getAlias' \
'-p[Set Password]:aliasname:->getAlias' '--password[Set Password]:aliasname:->getAlias' \
'-r[Remove Alias]:aliasname:->getAlias' '--remove[Remove Alias]:aliasname:->getAlias' \
'-k[Keep Connection]:aliasname:->getAlias' '--keep[Keep Connection]:aliasname:->getAlias' \
'-a[Add Alias]' '--add[Add Alias]'\
'-c[Add Command for Executing Alias]' '--command[Add Command for Executing Alias]'\
'-h[Show Help Message]' '--help[Show Help Message]'\
'-l[List Existing Alias]' '--list[List Existing Alias]'\
'-f[List Existing Alias with Connection String]' '--fulllist[List Existing Alias with Connection String]'\
'--version[Show Program Version]'
case "$state" in
getAlias)
local -a alias_list
alias_list=($(sshch -l))
_values -s ' ' 'Aliases' $alias_list
;;
esac

View File

@@ -7,22 +7,27 @@ def main():
setup(name='sshch', setup(name='sshch',
author='zlaxy', author='zlaxy',
url='https://github.com/zlaxy/sshch/', author_email='zlaxyi@gmail.com',
description='Ssh connection manager', url='https://gitlab.com/zlax/sshch',
license='DWTWL 2.5', description='Ssh connection and aliases manager',
version='0.7', long_description='SSH connection and aliases manager with curses and command line interface',
long_description_content_type='text/x-rst',
license='DWTWL 2.55',
version='1.09.7',
py_modules=['sshch'], py_modules=['sshch'],
scripts=['sshch/sshch'], scripts=['sshch/sshch'],
keywords='sshch ssh aliases curses manager',
python_requires='>=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4',
# http://pypi.python.org/pypi?%3Aaction=list_classifiers # http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[ classifiers=[
'Development Status :: 4 - Beta', 'Development Status :: 5 - Production/Stable',
'Environment :: Console :: Curses', 'Environment :: Console :: Curses',
'Intended Audience :: System Administrators', 'Intended Audience :: System Administrators',
'License :: Freeware', 'License :: Freeware',
'Natural Language :: English', 'Natural Language :: English',
'Operating System :: POSIX', 'Operating System :: POSIX',
'Programming Language :: Python :: 2.7', 'Programming Language :: Python',
'Topic :: Internet', 'Topic :: Internet',
'Topic :: System :: Networking', 'Topic :: System :: Networking',
'Topic :: System :: Systems Administration', 'Topic :: System :: Systems Administration',

File diff suppressed because it is too large Load Diff