使用secureCRT连接虚拟机

虚拟机三种上网方式:仅主机模式,桥接模式,NET模式

仅主机模式:只能和主机之间相互ping通,不能联网。不采用!

桥接模式:如果你的物理机网络IP发生变化,虚拟机的IP也会相应的改变。如果IP变化对虚拟机有影响的环境,此模式慎用!

使用NET模式!配置好虚拟机VMnet8的网关和主机下的VMnet8网关一致。就能够相互ping通。

方法参考:

https://blog.csdn.net/tkp2014/article/details/79099755

步骤:

  1. 虚拟机里面设置NAT模式

  2. 保证主机和虚拟机能够互相ping同


  3. 在Ubuntu上 ssh localhost

    报错:connect to host localhost port 22: Connection refused
    那就是没有ssh服务


  4. 执行命令

    sudo apt-get install openssh-server

相关知识参考:

https://blog.csdn.net/u011031430/article/details/77131841

https://blog.csdn.net/davidhzq/article/details/102539914

https://blog.csdn.net/qq_23412263/article/details/85318563

原文地址:https://www.cnblogs.com/ponxiaoming/p/12552601.html