centos9安装

centos-stream-9-stream-BaseOS-x86_64-iso安装包下载_开源镜像站-阿里云

用NAT

默认root用户不能登录

vim /etc/ssh/sshd_config

PermitRootLogin yes 去掉注释,改为yes

这样root用户可以登录

因为用的NAT模式

这样可以通过宿主机的50022端口访问虚拟机

宿主机

ipconfig可以查看ip