---
title: Ubuntu系统root用户登录时提示“Access denied”-昇腾社区
description: Ubuntu系统root用户无法登录，提示如下错误：
keywords: 虚拟机;Ubuntu系统
url: https://www.hiascend.com/document/caselibrary/detail/topic_0000002274343901
section: (其他)
---

# Ubuntu系统root用户登录时提示“Access denied”-昇腾社区

URL: https://www.hiascend.com/document/caselibrary/detail/topic_0000002274343901
描述: Ubuntu系统root用户无法登录，提示如下错误：
关键词: 虚拟机;Ubuntu系统

昇腾文档 [了解详情](https://www.hiascend.com/document)

故障案例 [了解详情](https://www.hiascend.com/document/caselibrary)

Ubuntu系统root用户登录时提示“Access denied”

Ubuntu系统root用户登录时提示“Access denied”

2025/04/11

930

问题信息

| 问题来源 | 产品大类 | 产品子类 | 关键字 |
| --- | --- | --- | ---|
| 内部测试 | 部署虚拟机 | 虚拟机 | 虚拟机、Ubuntu系统 |

#### 问题现象描述

Ubuntu系统root用户无法登录，提示如下错误：

```
login as: root
Access denied
```

#### 解决措施

1. 使用非root用户登录。
2. 使用su命令切到root用户。
3. 配置root用户登录信息。

修改ssh配置文件“/etc/ssh/sshd_config”。

```
#LoginGraceTime 2m
#PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
```

将#PermitRootLogin prohibit-password修改为PermitRootLogin yes，保存配置文件并reboot重启服务器。

本页内容

- 问题信息
- 问题现象描述
- 解决措施
