Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
function peco-sshconfig-ssh() {
local host=$(grep 'Host ' ~/.ssh/config | awk '{print $2}' | peco)
if [ -n "$host" ]; then
echo "ssh -F ~/.ssh/config $host"
ssh -F ~/.ssh/config $host
fi
}
alias sshc='peco-sshconfig-ssh'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment