首页 > 技术文章 > 本地主机连接虚拟机中主机

mozq 2019-11-17 10:16 原文

本地主机连接虚拟机中主机

步骤

  1. 查看虚拟机中主机的ip地址。
  2. 本地主机通过xshell,SecureCRT等工具连接虚拟机中主机。

ifconfig 查看虚拟机中主机ip地址

[root@frxxCentOS ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.211.128  netmask 255.255.255.0  broadcast 192.168.211.255
        inet6 fe80::1fcf:583b:a1ac:5104  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:c8:5c:c8  txqueuelen 1000  (Ethernet)
        RX packets 456  bytes 38758 (37.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 136  bytes 22424 (21.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

使用xshell连接虚拟机中主机

**文件 > 新建 **打开新建会话窗口。

类别>连接 输入协议,主机,端口号,连接名称

类别>用户身份验证 输入用户名,密码

点击连接测试。

推荐阅读