Question: #linux Experiment 4(configure network environment with vi editor) ##task 1 use ifconfig to change IP address. 1. start the CentOS virtual machine. 2. Use ifconfig

#linux Experiment 4(configure network environment with vi editor) ##task 1use ifconfig to change IP address. 1. start the CentOS virtual machine. 2. Use ifconfig to check IP 3. Use ifconfig to change IP 4. Use ping to check the connection between host machine and virtual machine 5. Use route to check route table ##task 2vi editor using(describe all ) 1. the 3 modes of vi i -- esc -- : -- 2. vi :q :q! :w :wq -- 3. vi editing in command mode dd yy nyy p ##task 3edit network adapter configure file to set IP , Gateway and DNS 1. get the vmnet8 ip address and gateway 2. use vi to edit /etc/sysconfigetwork-scripts/ifcfg-ens, set the ip address in the network of vmnet8 3. reboot the network service: systemctl restart network 4. check ip address and ping www.baidu.com 5. use vi to edit /etc/resolv.confand ping www.baidu.com. ##task 4use SSH to remote operate the linux server 1. use netstat antp to check open ports, get sshd

#linux Experiment 4(configure network environment with vi editor) ##task 1use ifconfig to

change IP address. 1. start the CentOS virtual machine. 2. Use ifconfig

images are continuation. its a complete question.. one full question.

[root@localhost "]# netstat -antp Active Internet connections (servers and established ) Proto Recy-Q Send-Q Local Address Foreign Address tcp 09.0.0.0:22 0.0.0.0:* State LISTEN PID 900 2. Use systemctl stop sshd to stop service check open ports again [root@localhost *]# systemctl stop sshd [root@localhost **]# netstat -antp 3. Check sshd configure file : /etc/ssh/ sshd_config; /etc/ssh/ ssh_config [root@localhost ssh]# grep -v *# retc/ssh-sshd_config grep -$ (describe the parameters in the above command) 4. Check sshd key file /etc/ssh/ ssh_host_rsa_key; /etc/ssh/ ssh_host_rsa_key.pub don't copy to check command : vi /etc/ssh/ ssh_host_rsa_key; vi /etc/ssh/ ssh_host_rsa_key.pub 5. Use systemctl start sshd to start service check open ports again [root@localhost systemctl start sshd [root@localhost 11 netstat -antp 6. Use xshell in the host machine connet to the virtual machine Connection established. To escape to local shell, press "Ctrl+Alt+]'. Last login: Wed Apr 22 00:44:41 2020 [root@localhost -]# 1 7.use netstat -antp to check network connection in host machine and virtual machine

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!