使用ssh链接Linux
2023-08-31 13:44 作者:Rickest-Morty | 我要投稿
1. 修改网络配置 固定IP地址
修改位置:
vi /etc/sysconfig/network-scripts/ifcfg-ens33
ifcfg-ens33:
修改两项:
BOOTPROTO=static
ONBOOT=yes
新增四项:(查看VMware的虚拟网络编辑器)
IPADDR=192.168.xxx.xxx
NETMASK=255.255.255.0
GATEWAY=192.168.xxx.1
DNS1=114.114.114.114 或 8.8.8.8
如何检验是否配置正确,主机和虚拟机里的linux相互ping,并且能够ping通
重启网卡:systemctl restart network
2. 关闭防火墙
// 关闭防火墙
systemctl stop firewalld
// 开机禁用防火墙
systemctl disable firewalld
// 查看防火墙状态
systemctl status firewalld