配置網(wǎng)絡(luò):
1.查看網(wǎng)卡名稱
ip addr(ifconfig 無(wú)法使用,需要后期安裝)
2. 配置靜態(tài)IP
(1)進(jìn)入網(wǎng)絡(luò)配置文件:
vim /etc/netplan/00-installer-config.yaml
(2)按一下 i ,進(jìn)入插入模式,開(kāi)始編輯網(wǎng)卡,如圖
?
(3)編輯好內(nèi)容后,按一下esc 鍵,輸入:wq ? 回車鍵(enter),保存
(4)生效網(wǎng)卡
sudo netplan apply
(4)ping 114.114.114.114 可以上網(wǎng)了
修改root密碼登錄:
輸入命令 "sudo passwd root",提示輸入當(dāng)前用戶密碼。
配置root遠(yuǎn)程ssh登錄:
安裝ssh命令:apt-get install openssh-*
打開(kāi)配置:vim /etc/ssh/sshd_config
修改如下文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-661065.html
# Authentication:
#LoginGraceTime 2m
#PermitRootLogin prohibit-password
PermitRootLogin yes
StrictModes yes
如果還是不能登錄
進(jìn)入root用戶:sudo su - root
修改root密碼:sudo passwd root文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-661065.html
到了這里,關(guān)于ubuntu-22.04.2網(wǎng)絡(luò)配置和root登錄和root遠(yuǎn)程ssh登錄的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!