Created
July 24, 2020 12:56
-
-
Save demiters/f51a0094eee3e56ea55b0e31095d9fbb to your computer and use it in GitHub Desktop.
Creates non-root user with ssh key auth on remote Ubuntu 20.04 server
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
#!/bin/bash | |
# Creates non-root user who can use ssh key auth, edit to your liking. | |
sudo apt install rsync | |
adduser arturs | |
usermod -aG sudo arturs | |
rsync --archive --chown=arturs:arturs ~/.ssh /home/arturs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment