Kush is a cross-platform command-line SSH remote address connection tool.
Kush is available on Linux, macOS and Windows platforms.
-
Binaries for Linux, Windows and Mac are available as tarballs in the release page.
-
Via Bash for Linux and macOS
curl -sS https://raw.githubusercontent.com/anigkus/kush/main/install.sh | bash
OR
curl -sS https://raw.githubusercontent.com/anigkus/kush/main/install.sh | bash -s -- 0.0.1
Usage: kush COMMAND [OPTIONS]
COMMAND:
create Create the kush for host
remove Remove the kush for host
update Update the kush for host
search Search the kush for host
export Export the kush to file
import Import the kush for file
OPTIONS:
-a, --address [required] Address
-p, --port [optional] Port, DEFAULT:22
-u, --username [optional] Username, DEFAULT:`whoami`
-x, --password [required] Password, Can only choose one( -x | -k )
-k, --key [required] Key, Can only choose one( -x | -k )
-t, --title [optional] Title
-f, --filter [optional] Filter( ADDRESS , USERNAME , PORT , AUTHTYPE , GROUP , TITLE )
-q, --quiet [optional] Quiet
-o, --output [optional] Output, DEFAULT:json
-c, --columns [optional] columns( ADDRESS , USERNAME , PORT ,AUTHTYPE , AUTH , GROUP , TITLE )
-w, --wide [optional] Wide
-g, --group [optional] Group, DEFAULT:default
-s, --sort [optional] Sort[ASC]( ADDRESS , USERNAME , PORT , AUTHTYPE , GROUP ), DEFAULT:ADDRESS
-v, --version version
-h, --help help
Run 'kush COMMAND --help' for more information on a command.
Direct Connection:
kush user@host -x 123456
kush user@host -k ~/.ssh/id_rsa_github.pub
To get more help with kush, check out our guides at https://github.com/anigkus/kush
-f 'ADDRESS = 1.1.1.1'
-f 'USERNAME = user'
-f 'PORT = 1'
-f 'AUTHTYPE = [ -x | -k ]'
-f 'GROUP = group'
-f 'TITLE = test'
-f 'ADDRESS = 1.1.1.1 && USERNAME = user'
-f 'ADDRESS = 1.1.1.1 || USERNAME = user'
-c 'ADDRESS , USERNAME , PORT ,AUTHTYPE , AUTH , GROUP , TITLE'
-s ADDRESS
—s USERNAME
—s PORT
—s AUTHTYPE
—s GROUP
~/.kush/.kush.json
~/.bash_profile
,Append below:
#kush
KUSH_HOME="/home/root"
export PATH=$KUSH_HOME/bin:$PATH
ADDRESS |
---|
192.168.1.1 |
192.168.1.2 |
> 1.2
ADDRESS | USERNAME | PORT | AUTHTYPE | AUTH | GROUP | TITLE |
---|---|---|---|---|---|---|
192.168.1.1 | root | 22 | -x | 123456 | group1 | xxx1 |
192.168.1.2 | root | 22 | -k | ~/id_rsa.pub | group3 | xxx1 |
> 1.2
kush root@192.168.1.10 -x 123456
kush create [OPTIONS]
kush create -a 192.168.1.1 -x 123456
kush create -a 192.168.1.1 -x 123456 -q
kush create -a 192.168.1.1 -k ~/.ssh/id_rsa_github.pub
kush create -a 192.168.1.1 -u root -p 22 -x 123456
kush create -a 192.168.1.1 -u root -p 22 -x 123456 -t test
kush create -a 192.168.1.1 -u root -p 22 -k ~/.ssh/id_rsa_github.pub -t test
kush create -a 192.168.1.1 -u root -p 22 -x 123456 -t test
kush create -a 192.168.1.1 -u root -p 22 -k ~/.ssh/id_rsa_github.pub -t test
kush create -a 192.168.1.1 -u root -p 22 -x 123456 -t test -g Group1
kush remove [OPTIONS]
kush remove -a 192.168.1.1 -u root -p 22
kush remove -a 192.168.1.1 -u root -p 22 -q
kush remove -a 192.168.1.1 -q
remove
according to the combination of [address] and filter conditions (GROUP=group1), non-interactive mode
kush remove -a 192.168.1.1 -f 'GROUP=group1' -q
kush update [OPTIONS]
kush update -a 192.168.1.1 -x 123456
kush update -a 192.168.1.1 -k ~/.ssh/id_rsa_github.pub
kush update -a 192.168.1.1 -t xxx
kush update -a 192.168.1.1 -u root -p 22
kush update -a 192.168.1.1 -u root -p 22 -g Group1
kush search [OPTIONS]
kush search -a 192.168.1.1
search
data according to address
condition and add filter condition (GROUP=group1), and sort and display according to address
kush search -a test.host1.com -f 'GROUP=group1' -s ADDRESS
kush export [OPTIONS]
kush export -o json > /tmp/kush.json
kush export -o json -f 'GROUP=group1' > /tmp/kush.json
kush export -o json -c 'ADDRESS,USERNAME' > ~/.kush/kush.json
kush import [OPTIONS]
kush import -o json < ~/.kush/kush.json
kush [ -v | --version ]
kush | kush -h | kush --help