From 7e2199191d99f169dae0790d565815c4d7989e14 Mon Sep 17 00:00:00 2001 From: Stefan Friese Date: Wed, 7 Aug 2024 17:15:16 +0200 Subject: [PATCH] added ssh-host which uses the configuration to select the host to connect to --- bash/.bash_functions | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bash/.bash_functions b/bash/.bash_functions index fae1b54..4b06b3a 100644 --- a/bash/.bash_functions +++ b/bash/.bash_functions @@ -9,6 +9,10 @@ ssh() { # exit } +ssh-host() { + ssh $(awk '$1 == "Host" && $2 != "*" {print $2}' "$HOME/.ssh/conf.d/individual_user" | fzf --reverse) +} + # Creates a new directory and immediately changes into it mkcd() { mkdir -p "$1" && cd "$1"