@hesed/ssh
v0.6.2
Published
CLI for SSH access to Kubernetes pods
Maintainers
Readme
ssh
CLI for SSH access to Kubernetes pods
Install
sdkck plugins install @hesed/sshUsage
$ npm install -g @hesed/ssh
$ ssh COMMAND
running command...
$ ssh (--version)
@hesed/ssh/0.6.2 linux-x64 node-v24.19.0
$ ssh --help [COMMAND]
USAGE
$ ssh COMMAND
...Commands
ssh ssh artisan COMMANDssh ssh artisan blockssh ssh exec COMMANDssh ssh exec allowssh ssh servers addssh ssh servers deletessh ssh servers discoverssh ssh servers listssh ssh servers profilessh ssh servers testssh ssh servers updatessh ssh tinker PHP
ssh ssh artisan COMMAND
Run a Laravel artisan command
USAGE
$ ssh ssh artisan COMMAND [--json] [--all] [--component <value>] [--container <value>] [--namespace <value>]
[-p <value>] [--role <value>]
ARGUMENTS
COMMAND Artisan command to run (e.g. cache:clear, route:list, queue:restart)
FLAGS
-p, --profile=<value> SSH server profile name from config
--all Run on ALL running pods; output is labelled per pod
--component=<value> Override pod component label (default: from profile)
--container=<value> Override container name (default: from profile)
--namespace=<value> Override Kubernetes namespace (default: from profile)
--role=<value> Override pod role label (default: from profile)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Run a Laravel artisan command
EXAMPLES
$ ssh ssh artisan cache:clear
$ ssh ssh artisan route:list -p prod
$ ssh ssh artisan queue:restart --namespace sa-testqaSee code: src/commands/ssh/artisan/index.ts
ssh ssh artisan block
View or edit a server profile's artisan blacklist
USAGE
$ ssh ssh artisan block [--json] [--add <value>...] [--clear] [-p <value>] [--remove <value>...]
FLAGS
-p, --profile=<value> SSH server profile name from config
--add=<value>... Add a command prefix to the blacklist (repeatable)
--clear Remove every entry from the profile's blacklist
--remove=<value>... Remove a command prefix from the blacklist (repeatable)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
View or edit a server profile's artisan blacklist
EXAMPLES
$ ssh ssh artisan block
$ ssh ssh artisan block -p prod
$ ssh ssh artisan block -p prod --add migrate --add migrate:fresh
$ ssh ssh artisan block -p prod --remove migrate:fresh
$ ssh ssh artisan block -p prod --clearSee code: src/commands/ssh/artisan/block.ts
ssh ssh exec COMMAND
Execute a bash command
USAGE
$ ssh ssh exec COMMAND [--json] [--all] [--component <value>] [--container <value>] [--namespace <value>]
[-p <value>] [--role <value>]
ARGUMENTS
COMMAND Command to execute
FLAGS
-p, --profile=<value> SSH server profile name from config
--all Run on ALL running pods; output is labelled per pod
--component=<value> Override pod component label (default: from profile)
--container=<value> Override container name (default: from profile)
--namespace=<value> Override Kubernetes namespace (default: from profile)
--role=<value> Override pod role label (default: from profile)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Execute a bash command
EXAMPLES
$ ssh ssh exec pwd
$ ssh ssh exec "tail -20 storage/logs/laravel-$(date +%Y-%m-%d).log" --all
$ ssh ssh exec "grep ERROR storage/logs/laravel.log" --namespace sa-testqaSee code: src/commands/ssh/exec/index.ts
ssh ssh exec allow
View or edit a server profile's exec allowlist
USAGE
$ ssh ssh exec allow [--json] [--add <value>...] [--clear] [-p <value>] [--remove <value>...]
FLAGS
-p, --profile=<value> SSH server profile name from config
--add=<value>... Add a command prefix to the allowlist (repeatable)
--clear Remove every entry from the profile's allowlist
--remove=<value>... Remove a command prefix from the allowlist (repeatable)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
View or edit a server profile's exec allowlist
EXAMPLES
$ ssh ssh exec allow
$ ssh ssh exec allow -p prod
$ ssh ssh exec allow -p prod --add tail --add grep
$ ssh ssh exec allow -p prod --remove grep
$ ssh ssh exec allow -p prod --clearSee code: src/commands/ssh/exec/allow.ts
ssh ssh servers add
Add SSH Server authentication
USAGE
$ ssh ssh servers add -p <value> --bastionHost <value> --sshHost <value> -u <value> -n <value> --component <value>
--role <value> --container <value> [--json]
FLAGS
-n, --namespace=<value> (required) Kubernetes namespace
-p, --profile=<value> (required) Profile name
-u, --sshUser=<value> (required) SSH username for both hops
--bastionHost=<value> (required) Bastion host
--component=<value> (required) Pod component label
--container=<value> (required) Container name within the pod
--role=<value> (required) Pod role label
--sshHost=<value> (required) Kubernetes host
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Add SSH Server authentication
EXAMPLES
$ ssh ssh servers add
$ ssh ssh servers add -p prodSee code: src/commands/ssh/servers/add.ts
ssh ssh servers delete
Delete an authentication profile
USAGE
$ ssh ssh servers delete [--json] [-p <value>]
FLAGS
-p, --profile=<value> Profile to delete
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Delete an authentication profile
EXAMPLES
$ ssh ssh servers delete
$ ssh ssh servers delete -p prodSee code: src/commands/ssh/servers/delete.ts
ssh ssh servers discover
Discover the component/role label values on a namespace's running pods (valid --component/--role targets)
USAGE
$ ssh ssh servers discover [--json] [--namespace <value>] [-p <value>]
FLAGS
-p, --profile=<value> SSH server profile name from config
--namespace=<value> Override Kubernetes namespace (default: from profile)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Discover the component/role label values on a namespace's running pods (valid --component/--role targets)
EXAMPLES
$ ssh ssh servers discover
$ ssh ssh servers discover -p prod
$ ssh ssh servers discover --namespace sa-testqaSee code: src/commands/ssh/servers/discover.ts
ssh ssh servers list
List authentication profiles
USAGE
$ ssh ssh servers list [--json]
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List authentication profiles
EXAMPLES
$ ssh ssh servers listSee code: src/commands/ssh/servers/list.ts
ssh ssh servers profile
Set or show the default authentication profile
USAGE
$ ssh ssh servers profile [--json] [--default <value>]
FLAGS
--default=<value> Profile to set as default
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Set or show the default authentication profile
EXAMPLES
$ ssh ssh servers profile
$ ssh ssh servers profile --default testSee code: src/commands/ssh/servers/profile.ts
ssh ssh servers test
Test authentication and connection
USAGE
$ ssh ssh servers test [--json] [-p <value>]
FLAGS
-p, --profile=<value> Authentication profile name
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Test authentication and connection
EXAMPLES
$ ssh ssh servers test
$ ssh ssh servers test -p prodSee code: src/commands/ssh/servers/test.ts
ssh ssh servers update
Update SSH Server authentication
USAGE
$ ssh ssh servers update -p <value> --bastionHost <value> --sshHost <value> -u <value> -n <value> --component <value>
--role <value> --container <value> [--json]
FLAGS
-n, --namespace=<value> (required) Kubernetes namespace
-p, --profile=<value> (required) Profile name
-u, --sshUser=<value> (required) SSH username for both hops
--bastionHost=<value> (required) Bastion host
--component=<value> (required) Pod component label
--container=<value> (required) Container name within the pod
--role=<value> (required) Pod role label
--sshHost=<value> (required) Kubernetes host
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Update SSH Server authentication
EXAMPLES
$ ssh ssh servers update
$ ssh ssh servers update -p testSee code: src/commands/ssh/servers/update.ts
ssh ssh tinker PHP
Execute PHP code in Laravel tinker
USAGE
$ ssh ssh tinker PHP [--json] [--all] [--component <value>] [--container <value>] [--namespace <value>] [-p
<value>] [--role <value>]
ARGUMENTS
PHP PHP code to execute via tinker
FLAGS
-p, --profile=<value> SSH server profile name from config
--all Run on ALL running pods; output is labelled per pod
--component=<value> Override pod component label (default: from profile)
--container=<value> Override container name (default: from profile)
--namespace=<value> Override Kubernetes namespace (default: from profile)
--role=<value> Override pod role label (default: from profile)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Execute PHP code in Laravel tinker
EXAMPLES
$ ssh ssh tinker "App\\Models\\User::count()"
$ ssh ssh tinker "echo User::first()->email;" -p prod
$ ssh ssh tinker "Cache::forget('some_key')"See code: src/commands/ssh/tinker.ts
