Issues such as port 22 access denied
Make sure to install relevant software
You can use yum search to find related ssh packages
To install openssh, openssh-servers, openssh-clients
Then start ssh, use service sshd start
Note that to turn off the firewall, you can directly stop iptables
Now ssh localhost can log in
To a large extent, it is caused by incorrect dns settings. If you cannot access the Internet under the default dns
It is necessary to add 8.8.8.8 and 8.8.4.4 to the DNS settings in the NAT settings in the virtual network editor in the Wmware software
No need to modify the configuration file in centos (except for the simplified version installation, some functions may be deleted)
At this point, centos can ping the external network
Need to modify two places: one is /etc/sysconfig/network, the other is /etc/hosts,
Modifying only any place will cause the system to start abnormally. First switch to the root user.
● /etc/sysconfig/network
Open the file with any of your favorite editors, there is a line of HOSTNAME=localhost.localdomain(If it is the default), modify localhost.localdomain is your host name.
● /etc/hosts
Open the file, there will be a line of 127.0.0.1 localhost.localdomain localhost. Of which 127.0.0.1
Is the local loop address, localhost.localdomain is the host name(hostname), Which is what you want to modify. localhost
Is the alias of the host name, it will appear at the Konsole prompt. Change the second item to your hostname, the third item is optional.
After the above two files are modified, they will not take effect immediately. If you want to take effect immediately, you can use hostname your-The hostname is temporarily modified. It only temporarily modifies the hostname, and it will be restored after the system restarts. But modifying the above two files is permanent, and restarting the system will get the new host name.
● uname -n
Check the host name after restart
[ root@localhost ~]# passwd
Changing password for user root.
New password:
Retype newpassword:
passwd: all authentication tokens updated successfully.
Recommended Posts