Created
January 27, 2026 21:14
-
-
Save f9n/10360c2a96fc0b3044f2e09d1ad6f751 to your computer and use it in GitHub Desktop.
Change teleport proxy
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
| function tsh-x() { | |
| # 1. List local profiles by looking at the keys directory and select via fzf | |
| local selected_profile=$(ls -d ~/.tsh/keys/*/ 2>/dev/null | xargs -n 1 basename | fzf --height 15% --reverse --header="📡 Select Teleport Cluster") | |
| # Exit if no selection is made (e.g., if ESC is pressed) | |
| if [ -z "$selected_profile" ]; then | |
| echo "No cluster selected." | |
| return | |
| fi | |
| echo "🚀 Connecting to $selected_profile..." | |
| # 2. Perform the login. tsh will automatically print the session status upon success. | |
| tsh login --proxy="$selected_profile" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment