9 releases

0.2.0 Sep 29, 2022
0.1.7 Aug 7, 2022
0.1.4 Jul 26, 2022

#621 in Configuration

22 downloads per month

MIT/Apache

22KB
398 lines

Crates.io

Simple SSH host finder. Fuzzy search built-in.

Table of contents

Installation

From crates.io

$ cargo install shf

From source

$ git clone https://github.com/jsmits/shf.git
$ cd shf

cargo build

$ cargo build --release

(put the resulting target/release/shf on your PATH)

cargo install

$ cargo install --path .

Usage

$ shf -h
shf 0.2.0
Simple SSH host finder

USAGE:
    shf [OPTIONS]

OPTIONS:
    -c, --config <CONFIG>    SSH config file [default: ~/.ssh/config]
    -h, --help               Print help information
    -l, --list               Print all hosts
    -V, --version            Print version information

Examples

Fuzzy search through your hosts

in ~/.ssh/config

$ shf

in a different SSH config file

$ shf -c /path/to/ssh/config

Search a host and directly SSH into it

bash / zsh

$ ssh $(shf)

fish

$ ssh (shf)

List all hosts

$ shf -l

How to contribute

Please create a new issue when you encounter a bug or have any suggestions or feature requests. Pull requests are welcome as well.

Dependencies

~19MB
~333K SLoC