Small CLI utility to manage ssh config file on Linux/Mac
- wget or cURL
- PHP 8.0
Copy and paste the following set of commands in your shell/terminal:
wget https://github.com/avramovic/sshconf/releases/latest/download/sshconf.phar && mv sshconf.phar /usr/local/bin/sshconf && chmod +x /usr/local/bin/sshconf && echo "sshconf installed, type: sshconf" && test -e ~/.ssh/config && cp ~/.ssh/config ~/.ssh/config.sshconf.backup
No wget? Try with cURL:
curl -L https://github.com/avramovic/sshconf/releases/latest/download/sshconf.phar -o sshconf.phar && mv sshconf.phar /usr/local/bin/sshconf && chmod +x /usr/local/bin/sshconf && echo "sshconf installed, type: sshconf" && test -e ~/.ssh/config && cp ~/.ssh/config ~/.ssh/config.sshconf.backup
This will download and copy the executable in /usr/local/bin/sshconf
and will back up existing ssh config file if it exists.
Connect to a ssh connection. This is the default command since v0.4
sshconf connect
List all connections
sshconf ls
Add a new SSH connection
sshconf add [options] [--] <host> <hostname>
Edit an existing SSH connection
sshconf edit [options] [--] <host>
Remove an existing SSH connection
sshconf rm <host>
View an existing SSH connection
sshconf view <host>