Task Based on Linux Session-MASTERCLASS

Task Based on Linux Session-MASTERCLASS

Q.1 Create a file via touch and update that file and also verify the timestamp and output will be redirected to another file.

No alt text provided for this image
No alt text provided for this image

Q.2 Add some of the data as per your choice and append that data via echo command in the same file

No alt text provided for this image

Q.3 Install httpd and set up your own web server.

No alt text provided for this image

systemctl start httpd - To start httpd

systemctl enable httpd - To enable httpd (By default disabled)

systemctl status httpd - To check the status of httpd

iptables -F

curl 192.168.1.3 (ip_address of your centOS) - To display the output of index.html file in Linux Terminal. You will get the output here of your html file as well as you can run 192.168.1.3 to receive the output on Windows browser.

No alt text provided for this image

Q.4 Copy some files from one Linux host to another Linux host via SCP.

No alt text provided for this image

To access host-2 from host-1

No alt text provided for this image

Q.5 Create another VM and setup password less authentication

Another VM can be setup by cloning the current VM.

  1. Go to Oracle VM VirtualBox and right click on the current CentOS and select Clone.
  2. Don't change the default settings and just click Next.
  3. Then choose Full Clone option from the current window.
  4. Click Clone. This will set another CentOS in your VirtualBox.

PASSWORD – LESS AUTHENTICATION

First generate the key using?ssh-keygen?in host 1 and then copy this key in host2 and host2 will verify if it’s coming from the right source or not and if the key is matched, it means you are able to login which means you need not to enter password while accessing host2 anymore. This is password-less authentication.

Keys are of 2 types:

·?????Public Key?– It is copied on another host and verification is done by?Private key

·?????Private Key

Implementation of Password-less authentication:

No alt text provided for this image
No alt text provided for this image


要查看或添加评论,请登录

Deepali Bhargava的更多文章

  • TASK BASED ON DOCKER

    TASK BASED ON DOCKER

    #TASK2.1: The compose should deploy two services (web and DB), and each service should deploy a container as per…

  • BASICS OF GITHUB AND GIT COMMANDS

    BASICS OF GITHUB AND GIT COMMANDS

    1. What is the difference between pushing and pulling? Pushing: The git push command is used to upload local repository…

  • Regex Assignment Day-3

    Regex Assignment Day-3

    Q.1 Create a folder /dummy/newfolder using the single command inside the Desktop - assume both the folders are not…

社区洞察

其他会员也浏览了