salmondx/ssh-vault

Lightweight utility for ssh connections management

0.0.6 2019-10-25 17:26 UTC

This package is auto-updated.

Last update: 2025-06-26 12:11:36 UTC


README

Lightweight utility for ssh connections management

How it works

It just parses and modifies ~/.ssh/config file. You can continue to use tools that you like and just use this wrapper to add or remove connections from your ssh config file.

Install

composer global require salmondx/ssh-vault

How to use

Add Host

# start a short setup wizard that reuses your past history
> ssh-vault add

List Hosts

> ssh-vault list

Remove Host

# Remove connection by its index from a list
> ssh-vault remove

Print raw ssh config content

# Just prints raw content of ~/.ssh/config
> ssh-vault raw

SSH config

SSH config file is super simple. It just stores information about your servers and how to connect to them. Imagine that you have a production server with IP 192.168.10.10. After you add it to your ssh config file

Host production
  HostName 192.168.10.10
  User local
  ForwardAgent yes

you can connect to it just by using this command:

ssh production

That's it. No more bash aliases, shell history, txt notes or whatever people usually do to store server details.