Skip to content

Instantly share code, notes, and snippets.

@kenzo0107
Last active April 27, 2017 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenzo0107/06b3b1e202f36b70815cfe0207292a66 to your computer and use it in GitHub Desktop.
Save kenzo0107/06b3b1e202f36b70815cfe0207292a66 to your computer and use it in GitHub Desktop.
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