Last active
November 21, 2024 09:53
-
-
Save fbakhda/216647f2bd20013491e209c6a5a2ebaa to your computer and use it in GitHub Desktop.
Simplify doing ssh via alias "sshlist" to list all possible SSH Clients from your .ssh/config
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
alias ll='ls -la' | |
alias sshlist='awk '\''BEGIN { printf("%-30s %-30s %-10s %-s\n", "Host", "HostName", "Port", "User") } /^Host / {host=$2} /Hostname / {hostname=$2} /Port / {prt=$2} /User / {usr=$2; printf "%-30s %-30s %-10s %s\n", host, hostname, (prt ? prt : "NA"), (usr ? usr : "NA" | |
)}'\'' ~/.ssh/config' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment