方法1:端口转发

右键虚拟机->设置->网络,连接方式选择NAT,如下图
window宿主机使用ssh访问VirtualBox的centos
设置端口转发规则,如下图
window宿主机使用ssh访问VirtualBox的centos
xshell等工具就可以通过127.0.0.1:22访问虚拟机的centos

方法2:Host Only双网卡模式

设置中,添加另一个Adapter,连接方式选择Host-Only Adapter,界面名称选择VirtualBox Host-Only Ethernet Adapter
window宿主机使用ssh访问VirtualBox的centos
进入centos中运行ifconfig命令查看多了块网卡的ip,然后xshell通过此ip连接

相关文章:

  • 2021-04-30
  • 2021-08-25
  • 2021-12-27
  • 2022-01-03
  • 2021-06-26
  • 2022-12-23
  • 2021-05-13
  • 2021-11-17
猜你喜欢
  • 2021-05-05
  • 2021-12-20
  • 2022-12-23
  • 2022-03-01
  • 2022-12-23
  • 2021-05-09
  • 2022-12-23
相关资源
相似解决方案