通过XShell链接virtualbox中的CentOS

浏览次数:3137 关键词 ( 链接  XShell  CentOS  virtualbox  )

通过xshell或者secure crt远程至虚拟机中安装的系统

  1. 虚拟机网络选项设置,选择Host-only Adapter

  2. 设置本地网络

  3. 设置virtualbox虚拟网卡的ip

     

  4.  

4.指定centos中的ip

 

5.编辑centos的ip,要和windows中的virtualbox虚拟网卡ip在同一网段上

 

6.在windows上ping虚拟机,查看能否ping通

7.用xshell连接,会话方式选择SSH,填入虚拟主机IP地址

    

8.虚拟机网卡设置为nat模式,则在虚拟机里能上网,使用浏览器访问网站

9.其他

 CentOS上检设置:

    1. 关闭防火前

   service iptables stop

          chkconfig iptables off

    2. 启动ssh服务

   service sshd start