Debian11.7网络安装版采用最小安装,没有安装ssh server,因为要远程管理,所以需要安装ssh并使用root账号远程登陆管理。

操作方法

1、安装SSH并查看IP地址。

root@debian-web:~# apt-get install openssh-server -y
root@debian-web:~# ip addr

2、安装vim编辑器

root@debian-web:~# apt-get install vim -y

3、配置root账号远程登陆

root@debian-web:~# vim /etc/ssh/sshd_config

#PermitRootLogin prohibit-password 解除注释并把prohibit-password改为yes

#PasswordAuthentication yes 解除注释(密码登陆)

#PermitEmptyPasswords no 解除注释(禁止空密码登陆)

316-2.png

4、重启ssh服务

root@debian-web:~# service sshd restart

至此,root即可实现远程登录系统了。

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。