howto:setup-sscs-linux-account-public-keys
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| howto:setup-sscs-linux-account-public-keys [2025/03/10 20:24] – created jnilsson | howto:setup-sscs-linux-account-public-keys [2025/07/17 18:32] (current) – [How to: Disable SSH Password Authentication] jnilsson | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| ===== One-stop script to create the sscs account ===== | ===== One-stop script to create the sscs account ===== | ||
| - | You can simply copy and paste the below code: | + | You can simply copy and paste the below code to download a script that we've set up for this purpose and execute it with sudo: |
| + | |||
| + | < | ||
| + | curl -O -L https:// | ||
| + | chmod +x ./ | ||
| + | sudo ./ | ||
| + | </ | ||
| + | |||
| + | Or if you prefer to run commands yourself, these are the equivalent commands: | ||
| < | < | ||
| SSCS_HOME=/ | SSCS_HOME=/ | ||
| sudo useradd -c " | sudo useradd -c " | ||
| - | echo " | + | echo " |
| sudo mkdir -p $SSCS_HOME/ | sudo mkdir -p $SSCS_HOME/ | ||
| sudo chmod 700 $SSCS_HOME/ | sudo chmod 700 $SSCS_HOME/ | ||
| sudo touch $SSCS_HOME/ | sudo touch $SSCS_HOME/ | ||
| sudo chmod 600 $SSCS_HOME/ | sudo chmod 600 $SSCS_HOME/ | ||
| - | echo " | + | sudo chown -R sscs:sscs $SSCS_HOME/ |
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| </ | </ | ||
| - | Or download and run the script | + | If you don't want the home directory to be /home/sscs, you can easily set your own SSCS_HOME variable to whatever location you choose and then copy/paste the rest of the commands. |
| - | < | + | |
| - | curl -O -L https://sites.socsci.uci.edu/~jnilsson/sscs/setup-sscs-account.sh | + | |
| - | sudo ./setup-sscs-account.sh | + | ===== How to: Disable SSH Password Authentication ====== |
| + | |||
| + | Disabling Password Authentication is generally as simple as setting the option '' | ||
| + | |||
| + | However, we've discovered that some linux distributions add another configuration file **/etc/ssh/sshd_config.d/ | ||
| + | |||
| + | Therefore, the easiest way to universally disable password authentication is to create a new file that sorts lexicographically before any other files that might be created in there, such as **00-disable-password-auth.conf**: | ||
| + | < | ||
| + | PasswordAuthentication no | ||
| + | </ | ||
| + | |||
| + | After setting the '' | ||
| + | |||
| + | * on Debian/ | ||
| + | sudo systemctl reload ssh | ||
| + | </ | ||
| + | * on RHEL/ | ||
| + | sudo systemctl reload sshd | ||
| </ | </ | ||
| - | If you don't want the home directory to be /home/sscs, you can easily set your own SSCS_HOME variable to whatever location you choose and then copy/paste the rest of the commands. Or if you download the '' | ||
howto/setup-sscs-linux-account-public-keys.1741638276.txt.gz · Last modified: 2025/03/10 20:24 by jnilsson
