Skip to content

Instantly share code, notes, and snippets.

@zdk
Created March 25, 2019 05:07
Show Gist options
  • Save zdk/03b62240d28c1c7e09a484a42f2783ca to your computer and use it in GitHub Desktop.
Save zdk/03b62240d28c1c7e09a484a42f2783ca to your computer and use it in GitHub Desktop.
My stupid SSH script. But it's smart enough to be useful in my daily work.
#!/bin/bash
SSH="/usr/local/bin/ssh"
case "$*" in
*'@'*) $SSH $* ;;
*' -l'*) $SSH $* ;;
*192\.168*) $SSH -l zdk $*;;
*) $SSH -l ec2-user $* ;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment