Skip to content

Instantly share code, notes, and snippets.

@mightydes
Last active August 29, 2015 13:56
Show Gist options
  • Save mightydes/9290151 to your computer and use it in GitHub Desktop.
Save mightydes/9290151 to your computer and use it in GitHub Desktop.
Linux
useradd -d /home/my_user -m -U -G sudo my_user
nano /etc/passwd
# Reaplce `my_user:x:1000:1000::/home/my_user:/bin/sh`
# with `my_user:x:1000:1000::/home/my_user:/bin/bash`
visudo
# Replace `%sudo ALL=(ALL:ALL) ALL`
# with `%sudo ALL=(ALL:ALL) NOPASSWD: ALL`
nano /etc/ssh/sshd_config
# Replace `#PasswordAuthentication yes`
# with `PasswordAuthentication no`
# For RSA key fingerprint
ssh {login}@{ip/host}
sshpass -p '{secret}' rsync --progress --ignore-errors -azqKL \
-e ssh {user}@{ip/host}:/var/www/remote/* /var/www/guest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment