大家好,今天我想和大家分享一下Linux如何連接遠程控制工具
我們都知道,Linux是著名的開源服務器操作系統,而在運維工程師的實際工作當中,我們不大可能時時刻刻都在服務器本地操作。
因此這時,我們要用遠程控制工具來管理服務器
系統版本: (centos 7)
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
[root@localhost ~]#
在內網當中測試 (vmnet 1)
查看Windows 的ip地址
配置本地網卡ens33
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens33
:wq (保存退出)
[root@localhost ~]# systemctl restart network //重啟網絡服務
查看ens33 (本地網卡)的地址
[root@localhost ~]# ifconfig ens33
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.75.2 netmask 255.255.255.0 broadcast 192.168.75.255
inet6 fe80::617f:ef93:80d4:e14e prefixlen 64 scopeid 0x20
ether 00:0c:29:87:af:a6 txqueuelen 1000 (Ethernet)
RX packets 3635 bytes 247237 (241.4 KiB)
RX errors 0 dropped 4 overruns 0 frame 0
TX packets 434 bytes 44488 (43.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@localhost ~]#
測試與windows主機通信
[root@localhost ~]# ping 192.168.75.1
PING 192.168.75.1 (192.168.75.1) 56(84) bytes of data.
64 bytes from 192.168.75.1: icmp_seq=1 ttl=128 time=0.367 ms
64 bytes from 192.168.75.1: icmp_seq=2 ttl=128 time=0.163 ms
64 bytes from 192.168.75.1: icmp_seq=3 ttl=128 time=0.144 ms
^C
— 192.168.75.1 ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 0.144/0.224/0.367/0.102 ms
主機通信正常
打開xshell(遠程控制工具)
ssh 192.168.75.2
我們成功連接了192.168.75.2 的這台Linux主機
謝謝大家,有問題可以給我留言