super-jump
v0.2.8
Published
Super Jump (`ssj`) is a command-line tool designed to simplify connecting to remote virtual machines (VMs) through a jump host (bastion host). It handles SSH connections, automatic MFA code generation, and file transfers.
Maintainers
Readme
Super Jump (ssj) Usage Guide
Super Jump (ssj) is a command-line tool designed to simplify connecting to remote virtual machines (VMs) through a jump host (bastion host). It handles SSH connections, automatic MFA code generation, and file transfers.
Installation
Ensure you have Node.js installed.
If installed globally via npm:
npm install -g super-jumpThis will make the ssj command available globally.
Commands
1. Register a Destination Profile (Interactive)
You can interactively create and save a connection profile to persistent storage.
ssj register [alias]You will be prompted for the following details:
- address: The hostname or IP address of the server.
- port: The SSH port (defaults to 22).
- username: Your SSH username.
- password: Your SSH password.
- mfa: (Optional) The secret key for generating Time-based One-Time Passwords (TOTP).
- bastion: (Optional) The alias of another registered profile to use as a jump host.
ssj will automatically generate a new RSA key pair for the connection and save it in the profile.
2. Connect to a Server
To connect to a registered server, simply use its alias.
ssj <alias>- If the profile has a
bastionconfigured,ssjwill first connect to the bastion and then forward the connection to the target server. - If the profile does not have a
bastion,ssjwill connect directly to it (useful for connecting to the jump host itself).
Example:
ssj prod-db3. Execute a Command Remotely
You can execute a single command on the remote server and exit immediately.
ssj <alias> [command...]Example:
ssj prod-db ls -la /var/logFile Transfers
Super Jump supports uploading and downloading files to/from the remote server.
Command Line Options
You can use flags when connecting:
- Upload:
-u <source_pattern> <destination_directory> - Download:
-d <remote_pattern> <local_directory>
Examples:
# Upload all .txt files to /tmp on the remote VM
ssj my-server -u "*.txt" /tmp/
# Download a specific log file to the current directory
ssj my-server -d "/var/log/app.log" ./