sshd rejects root with RSA key but sshd -d accept it
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
sshd rejects root with RSA key but sshd -d accept it
Hi, I had probrem that I cannot login (or execute command) as root with RSA key.
The following is a summery of above.
* login as normal user with password : OK
* login as normal user with RSA key : OK
* execute command as normal user with password : OK
* execute command as normal user with RSA key : OK
* login as root with password : OK
* login as root with RSA key : Failed
* execute command as root with password : OK
* execute command as root with RSA key : Failed
* login as root with RSA key in "sshd -d" : OK!!!
* execute command as root with RSA key in "sshd -d" : OK!!!
I Checked
* /root has permission root:root 700
* /root/.ssh has permission root:root 700
* /root/.ssh/* has permission root:root 600
* RSAAuthentication yes in sshd_config.
* PubkeyAuthentication yes in sshd_config.
* AuthorizedKeysFile .ssh/authorized_keys in sshd_config
* authorized_keys file is exist and valid.
* PermitRootLogin yes in sshd_config.
* Client key file and permissions are valid.
It was solved without my effort.
I tried again after system update and reboot. Then succeeded to login as root with RSA key.
---
Hi cyent, thank you for your reply.
I thought:
sudo requires tty, so it cannot use for execute command requiring root privilege in remote host.
For example, "btrfs receive."
"forced-commands-only" policy is just for it.
If there is authorization problem, it should failed to login also sshd -d.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.