Created
July 4, 2015 21:33
-
-
Save 5470x3/766f83204db96f6d5db8 to your computer and use it in GitHub Desktop.
.ssh/configからホスト名を引いてきてsshに渡すだけのoneliner
This file contains 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
grep "Host " ~/.ssh/config | while read f; do ssh -nv $f ;done < <(awk '{print $2}') | |
# sshは-nオプションを渡さないと標準出力がリモートホストのものに変わってしまう | |
# もともとは鍵があっているかどうか確認するためのスクリプトだった |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment