🔥 SSH (CheatSheet)
SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.
Installing on Ubuntu
apt-get install sshpass
Installing on macOS
brew install esolitos/ipa/sshpass
How to use ?
sshpass -p PASSWORD ssh USER@HOST
Using with rsync ?
sshpass -p PASSWORD rsync -Pa ORIGIN_FILE USER@HOST:DEST_FOLDER
Using concurency with rsync ?
sshpass -p PASSWORD xargs -n1 -P4 -I ORIGIN_FILE rsync -Pa ORIGIN_FILE USER@HOST:DEST_FOLDER