首页 > 编程知识 正文

ssh允许root登录,安卓root

时间:2023-05-03 05:05:26 阅读:63396 作者:3648

首先,让我们看看sshd_config中有关PermitRootLogin的配置信息。

# greppermitrootlogin/etc/ssh/sshd _ config

permitrootlogin是

# thesettingof ' permitrootloginwithout-password '

那么,permitrootloginwithout-password是什么意思?

PermitRootLogin设置项有哪些设置参数?

常见:是,否

陌生人: without-password,forced-commands-only,

PermitRootLogin配置详细信息:

specifieswhetherrootcanloginusingssh (1).the argument must be“是”

“without-password”,“forced-commands-only”,or“no”. thedefaultis“yes”。

ifthisoptionissetto“without-password”,passwordauthenticationisdisabledforroot。

ifthisoptionissetto“只限前向命令”,rootloginwithpublickeyauthentication

will be allowed,butonlyifthecommandoptionhasbeenspecified (whichmaybeusefulfor

takingremotebackupsevenifrootloginisnormallynotallowed ).All other authentica‐

tion methods are disabled for root。

If this option is set to “no”,root is not allowed to log in。

大致意思:

如果未设置PermitRootLogin,则默认值为yes,即root可以登录

设置without-password后,root可以登录,但不允许使用密码ssh登录

如果设置为no,则root无法登录

如果设置为forced-commands-only,则可以登录,但登录后不能进入交互。 执行指定的命令时自动结束。

现在很清楚了

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。