Skip to content

Latest commit

 

History

History
94 lines (47 loc) · 2.19 KB

Auxillary.md

File metadata and controls

94 lines (47 loc) · 2.19 KB

AUX PROJECT 1: SHELL SCRIPTING

In this project I will be adding 20 new Linux users on to a server, by creating a shell script that reads a csv file that contains the first name of the users to be onboarded.

First I will need to import onboard.sh script on to my instance.

Run the command below

scp -i ade.pem onboard.sh ubuntu@18.132.12.87:~/;

alt text

Now that the onboard.sh file was copied over successfully, I will have to update the file

alt text

alt text

Create a folder called Shell

Create the project folder called Shell

mkdir Shell

Move onboard.sh script into Shell folder

Move into the Shell folder

cd Shell

alt text

Create a csv file name names.csv

touch names.csv

Open the names.csv file

vim names.csv

Now insert 20 names into names.csv file

alt text

save and exit.

Next I'm going to create a group called Developers, add the users to that group.

Create the group by running the command

Sudo groupadd developers

Next authorize keys for each user ssh configuration

sudo chmod +x onboard.sh

Next import the users onto Linux server, create authorized-key file for each user ssh configurtion

alt text

Next step is to update current user with the public and private key.

changed to .ssh folder, create file for both public and private key.

alt text

I'm going to update the public file first

alt text

alt text

Save and Exit

Next is to update the private key

alt text

Save & exit.

Next I will need to create a public key for users to access the Linux server

vi aux-proj.pem

Now that I have created pem key called aux-proj.pem, I'm going to attempt to connect/access the Linux server using one of the user's that has been added to the server.

ssh -i aux-proj.pem Liam@13.40.183.60

alt text

I was able to successfully user Liam to access the Linux server.

END..