使用ssh鏈接Linux
2023-08-31 13:44 作者:Rickest-Morty | 我要投稿
1. 修改網(wǎng)絡(luò)配置 ?固定IP地址
? ? ? ? 修改位置:
?? ? ? ? ? ? ?vi /etc/sysconfig/network-scripts/ifcfg-ens33
? ? ? ? ifcfg-ens33:
? ? ? ? ? ? ? 修改兩項(xiàng):
? ? ? ? ? ? ? ? ? ? BOOTPROTO=static
? ? ? ? ? ? ? ? ? ? ONBOOT=yes
?? ??? ?? ? ? 新增四項(xiàng):(查看VMware的虛擬網(wǎng)絡(luò)編輯器)
?? ??? ?? ? ? ? ? ? IPADDR=192.168.xxx.xxx
?? ??? ?? ? ? ? ? ? NETMASK=255.255.255.0
?? ??? ?? ? ? ? ? ? GATEWAY=192.168.xxx.1
?? ??? ?? ? ? ? ? ? DNS1=114.114.114.114 或 8.8.8.8
如何檢驗(yàn)是否配置正確,主機(jī)和虛擬機(jī)里的linux相互ping,并且能夠ping通
重啟網(wǎng)卡:systemctl restart network
2. 關(guān)閉防火墻
?? ?// 關(guān)閉防火墻
?? ?systemctl stop firewalld
?? ?// 開(kāi)機(jī)禁用防火墻
?? ?systemctl disable firewalld
?? ?// 查看防火墻狀態(tài)
?? ?systemctl status firewalld
3. 使用ssh遠(yuǎn)程工具連接虛擬機(jī)?
標(biāo)簽: