This file contains 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 | |
# This script adds a new user to the remote server , adds it to sudoers list and enables passwordless login | |
# follow on my blog https://www.coderew.com/computers/ssh-add-user-remotely-script/ | |
read -p "Enter your Server IP:" serverIP #get server IP address | |
read -p "Enter a new username:" newusername #username for the new user | |
read -s -p "Enter the password for $newusername:" password #password | |
printf "\nEnter the root password of the server when prompted\n" |
NewerOlder