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.
Q.2 Add some of the data as per your choice and append that data via echo command in the same file
Q.3 Install httpd and set up your own web server.
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.
Q.4 Copy some files from one Linux host to another Linux host via SCP.
To access host-2 from host-1
Q.5 Create another VM and setup password less authentication
Another VM can be setup by cloning the current VM.
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: