Last active
August 29, 2015 13:56
-
-
Save mightydes/9290151 to your computer and use it in GitHub Desktop.
Linux
This file contains hidden or 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
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` |
This file contains hidden or 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
nano /etc/ssh/sshd_config | |
# Replace `#PasswordAuthentication yes` | |
# with `PasswordAuthentication no` |
This file contains hidden or 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
# 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