Add 'fzf-ssh' script

master
Hektor Misplon 2023-10-21 16:52:37 +02:00
parent 0f8704bbb5
commit 0485edf197
2 changed files with 8 additions and 0 deletions

3
.bin/fzf-ssh Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
ssh "$(ssh-hosts | fzf)"

5
.bin/ssh-hosts Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
ssh_hosts=$(grep -E 'Host [a-z0-9\-]*$' ~/.ssh/config | awk '{print $2}')
echo "$ssh_hosts"