create user and disable password auth
This commit is contained in:
commit
0276a90ceb
2 changed files with 14 additions and 0 deletions
10
create_sudo_user.sh
Normal file
10
create_sudo_user.sh
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
# Pass an argument with the username and that will be created and added to the sudo group
|
||||||
|
|
||||||
|
no_argument_was_passed=false; [ -z "$1" ] && no_argument_was_passed=true
|
||||||
|
$no_argument_was_passed && echo "No username has been passed" && return
|
||||||
|
|
||||||
|
USERNAME=$1
|
||||||
|
echo "Creating user $USERNAME"
|
||||||
|
adduser $USERNAME
|
||||||
|
usermod -aG sudo $USERNAME
|
||||||
|
echo "Done"
|
||||||
4
how_to_disabe_ssh_pwd_auth.txt
Normal file
4
how_to_disabe_ssh_pwd_auth.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
- Go to file /etc/ssh/sshd_config
|
||||||
|
- Find param "ChallengeResponseAuthentication" and set to "no"
|
||||||
|
- Find param "PasswordAuthentication" and set to "no"
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue