大网数据广告活动
服务器运维问答

Why is SSH authentication failing when using the login password?

· 52CE 我爱测

I am trying to login via ssh to a server with the root account (yes, I know, a bad idea; I'm just testing), but authentication keeps failing : Feb 21 09:26:38 myserver sshd[4481]: Failed password for root from x.x.x.x port 60708 …

问题原文

原帖链接 · daveslab · CC BY-SA 4.0

I am trying to login via ssh to a server with the root account (yes, I know, a bad idea; I'm just testing), but authentication keeps failing :

Feb 21 09:26:38 myserver sshd[4481]: Failed password for root from x.x.x.x port 60708 ssh2

When I connect to the server via ssh with another account and do su - to get root access, I enter the password and it works. How is it possible that the password won't work for SSH but works on local?

已采纳解答

原帖链接 · Stuggi · CC BY-SA 4.0

Most SSH servers by default doesn’t allow root login over SSH, you’ll need to change a line in the SSH server configuration to allow this.

On most systems, this is done by uncommenting the PermitRootLogin yes line in the /etc/ssh/sshd_config file, and restarting the SSH daemon.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-02-21)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。