| Crates.io | sshh |
| lib.rs | sshh |
| version | 0.1.3 |
| created_at | 2019-11-30 03:17:22.462386+00 |
| updated_at | 2019-12-19 06:10:33.167137+00 |
| description | Quickly SSH into hosts |
| homepage | https://github.com/daniellockyer/sshh |
| repository | https://github.com/daniellockyer/sshh |
| max_upload_size | |
| id | 185473 |
| size | 29,326 |
(aka ssh hosts) - Quickly SSH into hosts
Problem:
.ssh/config doesn't support grouping of servers.bashrc file was filling up with messy aliasessshh allows you to list all your hosts in a configuration file, and then connect to them using a name.
$ sshh project-server # connect to the `project-server` host
$ sshh -g acme-corp main # connect to the `main` host under the `acme-corp` group
Given an ambiguous host name, sshh will connect to the last one defined in the config file.
sshh ends up calling ssh with the suitable arguments, so make sure it is installed.
cargo install sshhcargo build --releasecargo install --path .sshh uses the yaml file format, generally stored in ~/.config/sshh.yml. You can pass a custom config through the -c flag.
A server has the following options:
name: the server nameuser (optional): defaults to "root"host: the domain or IP addressport (optional): defaults to 22forwarding (optional): whether to enable authentication agent forwarding, defaults to falseidentity_key (optional): the location of the identity key to use, defaults to nothingServers can be put into groups, or listed separately. List individual servers under the servers mapping, and groups under groups. The config file is deserialized using serde_yaml. The example below should give a good indication of the expected format.
servers:
- name: project-server
user: banana
host: 1.2.3.4
port: 1337
forwarding: true
- name: vpn
host: 2.3.4.5
groups:
- name: random-company
servers:
- name: main
user: app
host: random-company.com
- name: backup
user: app
host: backup.random-company.com
- name: acme-corp
servers:
- name: main
host: main.acme-corp.com
- name: venus
host: venus.acme-corp.com