新裝的 Debian12.1系統(tǒng) ,考慮到安全性并未開啟超級(jí)用戶,簡(jiǎn)單記錄一下安裝SSH和打開 root 遠(yuǎn)程登錄的操作。
1.Debian12配置ssh服務(wù)器
1.1安裝ssh安裝ssh-server
sudo apt install openssh-server
1.2啟動(dòng)ssh
sudo systemctl start ssh
1.3啟用ssh
sudo systemctl enable ssh?
1.4查看ssh狀態(tài)?
sudo systemctl status ssh
2.打開 root 遠(yuǎn)程登錄的操作
2.1給 root 用戶設(shè)置密碼
sudo passwd root
2.2修改 /etc/ssh/sshd_config 文件
2.2.1找到 #PermitRootLogin
一行 改成 PermitRootLogin yes
,也就是刪掉前端的注釋并做改后面的值為yes
2.2.2刪掉#PasswordAuthentication yes
前面的 #
文章來源:http://www.zghlxwxcb.cn/news/detail-841535.html
文章來源地址http://www.zghlxwxcb.cn/news/detail-841535.html
2.3重啟 ssh 服務(wù)
sudo service ssh restart
到了這里,關(guān)于Debian 12.1安裝ssh并開啟 root 用戶 ssh 登錄功能的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!