Skip to content

Instantly share code, notes, and snippets.

@mikedamoiseau
Last active July 6, 2017 03:23
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 mikedamoiseau/c4a7b92cf831b32fbe4a5a0f0e878c5c to your computer and use it in GitHub Desktop.
Save mikedamoiseau/c4a7b92cf831b32fbe4a5a0f0e878c5c to your computer and use it in GitHub Desktop.
Alias to ssh with password
1. Install sshpass `sudo apt-get update && sudo apt-get install sshpass`
2. edit file `~/.bash_aliases`
3. add the line `alias name_of_alias='sshpass -f <(printf "%s\n" "our_password") ssh user@hostname'
4. compile your `.bash_aliases` file: `source .bash_aliases``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment