diff --git a/.bin/fzf-ssh b/.bin/fzf-ssh new file mode 100755 index 0000000..0253c64 --- /dev/null +++ b/.bin/fzf-ssh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +ssh "$(ssh-hosts | fzf)" diff --git a/.bin/ssh-hosts b/.bin/ssh-hosts new file mode 100755 index 0000000..c6e6547 --- /dev/null +++ b/.bin/ssh-hosts @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +ssh_hosts=$(grep -E 'Host [a-z0-9\-]*$' ~/.ssh/config | awk '{print $2}') + +echo "$ssh_hosts"