XShell鏈接本地虛擬機

1.環境與相關軟件shell

  1.1 本機系統win10家庭版,使用軟件Xshell,vmware15,虛擬機中的系統centos7centos

2.具體實現服務器

  2.1 因爲在虛擬機中操做不太方便,使用終端遠程管理本地虛擬機中的服務器.這樣開着虛擬機就可在XShell中管理網絡

  2.2 使用ip a 或者 ifconfig等命令查看虛擬機的ip,oop

[linoxwong@CentOS-7-64 ~]$ ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.235.129  netmask 255.255.255.0  broadcast 192.168.235.255
        inet6 fe80::7739:9602:d64b:bc45  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:9a:63:9b  txqueuelen 1000  (Ethernet)
        RX packets 207271  bytes 307678779 (293.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 89761  bytes 5412462 (5.1 MiB)
        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 48  bytes 4080 (3.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 48  bytes 4080 (3.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:ee:0a:c6  txqueuelen 1000  (Ethernet)
        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

  如上代碼,我使用了ifconfig命令後獲得了三個網絡信息    ens33:   lo:  virbr0:  看你的系統用的網絡  我用的是ens33   因此在ens33中去找ipcentos7

   2.3  本地橋接網卡的設置,使用shell鏈接網卡須要將VMware Virtual Ethernet Adapter for VMnet8(橋接) 與虛擬機的IP在一個網段中spa

  2.4 獲得了ip以後,我就能在xshell中鏈接了,以下 新建會話,主機寫上剛剛獲得的ipcode

 

  2.5 點了肯定以後,輸入一次用戶,一次密碼以後就登陸上了,輸入用戶跟密碼忘記截圖了,下面是登陸進入的圖片blog

 

   

3. 總結圖片

使用終端登陸以後,無需在虛擬機中操做,這樣只要掛着虛擬機就能夠了。很方便。

相關文章
相關標籤/搜索