hostnextra-ssh-config
v1.0.1
Published
Official SSH configuration management plugin for the HostnExtra CLI.
Maintainers
Readme
HostnExtra SSH Config
Official SSH configuration management plugin for hostnextra.
Manage SSH servers using friendly names instead of remembering IP addresses, usernames and ports.
Features
- Add SSH servers
- List configured servers
- Edit server configuration
- Remove servers with confirmation
- Connect using friendly names
- Local JSON storage
- Connection history
- Automatic backups before deletion
- Zero runtime dependencies
- Cross-platform support
Requirements
- Node.js 22 or later
- OpenSSH client available in your system PATH
- HostnExtra CLI (
hostnextra)
Installation
Install the HostnExtra CLI.
npm install -g hostnextraInstall the SSH Config plugin.
hostnextra plugin add ssh-configVerify the installation.
hostnextra plugin listExample output:
Installed Plugins
✓ ssh-configUpdate
Install the latest version of the plugin.
hostnextra plugin update ssh-configUsage
All commands are available under:
hostnextra sshShow help.
hostnextra ssh helpAdd a server
Minimum configuration:
hostnextra ssh add web-01 192.168.1.10Specify a user.
hostnextra ssh add web-01 192.168.1.10 \
--user rootSpecify a custom SSH port.
hostnextra ssh add web-01 192.168.1.10 \
--port 2222Use a private key.
hostnextra ssh add web-01 192.168.1.10 \
--identity-file ~/.ssh/id_ed25519Add a description.
hostnextra ssh add web-01 192.168.1.10 \
--description "Production web server"Add tags.
hostnextra ssh add web-01 192.168.1.10 \
--tags production,webUse a jump host.
hostnextra ssh add web-01 192.168.1.10 \
--proxy-jump bastionComplete example.
hostnextra ssh add web-01 192.168.1.10 \
--user ubuntu \
--port 22 \
--identity-file ~/.ssh/id_ed25519 \
--proxy-jump bastion \
--description "Production server" \
--tags production,ubuntuList servers
hostnextra ssh listConnect
Connect using the configured server name.
hostnextra ssh connect web-01The plugin launches your system's OpenSSH client using the stored configuration.
The plugin automatically applies:
- Username
- Port
- Identity file
- ProxyJump
Edit a server
Update the hostname.
hostnextra ssh edit web-01 \
--host 10.0.0.15Update the username.
hostnextra ssh edit web-01 \
--user rootUpdate the SSH port.
hostnextra ssh edit web-01 \
--port 2222Rename a server.
hostnextra ssh edit web-01 \
--name productionUpdate the identity file.
hostnextra ssh edit production \
--identity-file ~/.ssh/id_rsaUpdate tags.
hostnextra ssh edit production \
--tags production,databaseRemove a server
hostnextra ssh remove productionThe plugin requests confirmation before deleting the server.
A backup is automatically created before removal.
# Help
```bash
hostnextra ssh helpLocal Storage
Configuration files are stored locally.
~/.hostnextra/
├── backups/
├── history.json
├── servers.json
└── config.jsonConfiguration Fields
| Field | Description | |-------|-------------| | name | Friendly server name | | host | Hostname or IP address | | user | SSH username | | port | SSH port | | identity-file | Private SSH key | | proxy-jump | SSH jump host | | description | Optional description | | tags | Server tags |
Examples
Development server.
hostnextra ssh add dev 192.168.1.100 \
--user developer \
--identity-file ~/.ssh/id_ed25519Production server.
hostnextra ssh add production 10.10.10.5 \
--user ubuntu \
--port 22 \
--identity-file ~/.ssh/id_ed25519 \
--tags productionServer behind a bastion host.
hostnextra ssh add database 172.16.0.20 \
--user postgres \
--proxy-jump bastionUninstall
Remove the plugin.
hostnextra plugin remove ssh-configYour saved server configuration under ~/.hostnextra/ is not removed automatically.
License
MIT
