-
新建虚拟机->设置->网卡1(NAT网络)->网卡2(Host-Only网络)
-
启动->选择镜像->选择硬盘->选择时区->设置root密码
-
开启网卡
# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
...
ONBOOT=yes #修改
...
# vi /etc/sysconfig/network-scripts/ifcfg-enp0s8
...
BOOTPROTO=static #修改
ONBOOT=yes #修改
IPADDR=192.168.59.222 #增加
GATEWAY=192.168.59.1 #增加
NETMASK=255.255.255.0 #增加
...
# systemctl restart network
- yum install -y openssh-server
- 设置sshd
# vi /etc/ssh/sshd_config
Port 22
ListenAddress 0.0.0.0
ListenAddress ::
PermitRootLogin yes
# systemctl restart sshd
网友评论