Ubuntu 在root 权限下SSH Permission denied, please try again 问题

通常为了使用方便,我们把当前用户的权限设置为root,但在使用ssh localhost命令时,会出现认证失败的提示,sshd_config文件内容也进行了相应修改没用,后来尝试修改了一下root密码,没想到OK了。


root@chiminh-ubt:~# passwd root
输入新的 UNIX 密码:
重新输入新的 UNIX 密码:
passwd:已成功更新密码
root@chiminh-ubt:~# ssh localhost
root@localhost's password:
Linux chiminh-ubt 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux
Ubuntu 10.04 LTS

Welcome to Ubuntu!
 * Documentation:  https://help.ubuntu.com/

546 packages can be updated.
322 updates are security updates.


The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

root@chiminh-ubt:~#


出现"ssh Permission denied, please try again"的错误提示可能有几个原因。首先,可能是输入的账号或密码有,应该检查输入的账号和密码是否正确。其次,可能是该账号被禁止登录了,可以查看sshd配置文件中是否有将该账号禁止登录的设置。最后,如果以root用户登录出现该错误提示,可能是配置文件中将root设置为不允许远程登录,可以编辑sshd配置文件,将PermitRootLogin设置为yes,以允许root登录,并重新启动sshd服务。 另外,根据引用的信息,还有可能是连接到upstream时出现了权限拒绝的错误,这可能与服务器的文件权限或访问控制有关。可以检查相关文件的权限设置,确保用户具有足够的权限来连接到upstream。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [SSH连服务器提示Permission denied,please try again”的原因与解决办法](https://blog.csdn.net/u013007181/article/details/121109027)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [详解Nginx 13: Permission denied 解决方案](https://download.csdn.net/download/weixin_38637093/14093900)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值