Last active
April 22, 2020 09:17
-
-
Save rbudiharso/e8212f9c91b9e36a4b142e0f71fe0ff9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this function in your .bashrc or .zshrc and call shf for easy host selection | |
# requirements: | |
# - grep | |
# - fzf | |
ssf() { | |
host=$(grep -e "^Host " ~/.ssh/config | awk '{print $2}' | fzf) | |
echo "SSH session started, connecting to" $host | |
ssh $host | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment