# Debian 10.1 启用root帐户登录ssh

## 一、修改

先用其它帐户登录ssh，然后su到root输入密码登录(如果是在本地登录的可直接用root登录进系统，不用切换用户)，修改/etc/ssh/sshd\_config，\
将#PermitRootLogin prohibit-password\
修改为PermitRootLogin yes

## 二、重启服务

执行如下命令重启ssh服务：/etc/init.d/ssh restart\
即可以root用户登录ssh。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cgo.gitbook.io/my-it-blog/linux/debian-10.1-an-zhuang-wan-hou-qi-yong-root-deng-lu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
