LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 08-17-2015, 02:59 AM   #1
yek
Member
 
Registered: Feb 2015
Location: Yokoahama Kanagawa, Japn.
Distribution: Manjaro Linux, PCLinuxOS, Sabayon Linux, Vine Linux, CentOS
Posts: 41

Rep: Reputation: 0
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.

Environment:

[Client]
* Manjaro Linux 0.8.13
* OpenSSH_6.9p1, OpenSSL 1.0.2d 9 Jul 2015
[Server]
* CentOS 7
* OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013

Why I cannot login as root with RSA key without -d option in sshd?

Thanks in advance.
 
Old 08-18-2015, 04:01 PM   #2
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 398

Rep: Reputation: 87
A lot of systems are explicitly configured to stop direct root login via ssh.

You have to have and login in as ordinary user and sudo

I think this is configured either at the ssh or pam level (not sure which check both).

Or just go with the flow and sudo.
 
Old 08-19-2015, 11:15 AM   #3
yek
Member
 
Registered: Feb 2015
Location: Yokoahama Kanagawa, Japn.
Distribution: Manjaro Linux, PCLinuxOS, Sabayon Linux, Vine Linux, CentOS
Posts: 41

Original Poster
Rep: Reputation: 0
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.
 
  


Reply

Tags
login, root, rsa, ssh, sshd_config



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't start sshd. Error is "Generating SSH1 RSA host key [FAILED] ryannlinux Linux - Newbie 9 03-20-2009 03:42 AM
Starting sshd: /etc/init.d/sshd: line 113: /usr/sbin/sshd: Permission denied sumanc Linux - Server 5 03-28-2008 04:59 AM
SSHD NOT to send rsa fingerprint zeca_neca Linux - General 2 09-26-2007 05:56 PM
sshd rsa authentification propblems cruiser252 Fedora 4 08-25-2005 01:28 AM
Sshd Rsa Authentication! Help! ryanstrayer Linux - General 0 01-23-2002 11:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration