Created
March 1, 2023 15:14
-
-
Save Dagimal/73b550338c5b60cf55c3866c43ebf9f7 to your computer and use it in GitHub Desktop.
tui ssh manager with fzf
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