Last active
August 29, 2015 13:55
-
-
Save balda/8729686 to your computer and use it in GitHub Desktop.
Alias ssh. Use it with `ssh [shortcut]`. Change `.bash_profile` for shortcuts autocompletion.
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
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2 | tr ' ' '\n')" scp sftp ssh |
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
# contents of $HOME/.ssh/config | |
Host [shortcut] | |
HostName [www.example.com] | |
Port 22 | |
User [username] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment