root账号无法ssh

IPv4/v6、端口、VPN、代理连接、SSH、远程访问

版主: TerraSupportTMsupportTMjack

主题已锁定
头像
peizhsjtu
帖子: 15
注册时间: 2020年 5月 17日 星期天 10:45 am

root账号无法ssh

帖子 peizhsjtu »

用PuTTY登陆时,总提示:
login as: root
Using keyboard-interactive authentication.
Password:
Access denied
Using keyboard-interactive authentication.
Using keyboard-interactive authentication.
Password:
Access denied
Using keyboard-interactive authentication.
Using keyboard-interactive authentication.
Password:
Access denied
Using keyboard-interactive authentication.

这里的话,我用其他账号是可以登录的。
查找网上解决办法:
================================================
这里面主要涉及到两个问题:
1、默认的/etc/ssh/sshd_config文件中PasswordAuthentication这一项前面带"#"号,代表不生效,即#PasswordAuthentication no,就是把no改为yes,不把前面的"#"去掉,也是无效的;
2、仍为默认的/etc/ssh/sshd_config文件中PermitRootLogin这一项前面也是带"#"号,代表不生效,即#PermitRootLogin no,就是把no改成yes,不把前面的"#"去掉,也是无效的;

/etc/ssh/sshd_config文件中需要修改两个地方,才允许远程登陆:
#PasswordAuthentication no 修改为: PasswordAuthentication yes //认证的方式为密码认证,即把前面的#注释掉;
#PermitRootLogin no 修改为:PermitRootLogin yes //允许管理员(远程)登陆,即把前面的#注释掉;
===================================
问题是,我root没法ssh,怎么更改sshd_config文件呢?因为我看网页操作界面也没有任何这个文件,只有我个人用户的文件,其他系统文件都被隐藏起来了。
头像
peizhsjtu
帖子: 15
注册时间: 2020年 5月 17日 星期天 10:45 am

Re: root账号无法ssh

帖子 peizhsjtu »

想执行su root切换根用户提示错误:
su: must be suid to work properly
TMS

Re: root账号无法ssh

帖子 TMS »

你好,重置下admin密码试试能不能登录?当前使用TNAS版本是?
头像
peizhsjtu
帖子: 15
注册时间: 2020年 5月 17日 星期天 10:45 am

Re: root账号无法ssh

帖子 peizhsjtu »

TMS 写了: 2021年 1月 2日 星期六 11:19 am 你好,重置下admin密码试试能不能登录?当前使用TNAS版本是?
十分感谢~重置密码之后能登录了,这问题困扰我很久了,再次万分感谢!
主题已锁定

回到 “网络”