A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/breda/zsh-ssh-quickconnect below:

breda/zsh-ssh-quickconnect: ZSH plugin to quickly connect to already known hosts (requires fzf)

Just a simple utility function that grabs all hosts from .ssh/config file & known_hosts (when a Host entry uses glob matching) and prints them for selection using fzf and SSHes into the selected entry.

This script requires fzf to be installed.

Just clone this repo somewhere then source the .sh script in your .zshrc somewhere

git clone https://github.com/breda/zsh-ssh-quickconnect $ZSH/plugins/ssh-quick-connect
source $ZSH/plugins/zsh-ssh-quickconnect.plugin.sh

Then run sshqc anytime to start SSHing

Why this might be useful for you

I'm usually managing a couple boxes that I need to SSH into, the way I manage them is I have DNS entries that looks like "bastion.staging.work" or something like that, and then in my SSH config file I have something like

Host *.staging.work
    IdentityFile /home/user/.ssh/work/staging

Host *.production.work
    IdentityFile /home/user/.ssh/work/prod

But because I name the DNS entries differently I can't be bothered to remember them all, so this utility function grabs all defined Hosts from my SSH config, expands any entries containing globs with what I have in my known_hosts file and displays a nice list to choose from. Making it easier and faster to SSH into a target box.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4