- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Secure OS Software for Linux
- >
- Re: ssh PermitRootLogin without-password
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2011 11:42 AM
тАО04-29-2011 11:42 AM
I have 19 linux servers that refuse to take this change:
PermitRootLogin without-password
#PermitRootLogin yes
...they don't stop a ssh -l root hostname.
I've attached a file with the following output for each server, maybe one of you guys can see something that I don't.
1st Line: uname -a
2nd Line: ls -la /etc/ssh/sshd_config
3rd Line: ssh -V
4th Line: head -1 /etc/ssh/sshd_conifg
5th Line: cat /etc/redhat-release | awk....
Thanks in advance!!!
Solved! Go to Solution.
- Tags:
- ssh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2011 11:44 AM
тАО04-29-2011 11:44 AM
Re: ssh PermitRootLogin without-password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2011 12:54 PM
тАО04-29-2011 12:54 PM
Re: ssh PermitRootLogin without-password
What was the _change_? Which file, where?
Showing "before" and "after" would reveal
more.
I'll guess. Did you comment out the line:
PermitRootLogin yes
?
These configuration files, as supplied, are
normally filled with default values, so
changing
PermitRootLogin yes
to
# PermitRootLogin yes
may be less effective than changing it to
PermitRootLogin no
In many installations, comments in the files
explain this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2011 02:25 PM
тАО04-29-2011 02:25 PM
Re: ssh PermitRootLogin without-password
That's what it means after all ("all authentication methods allowed except password authentication").
Are you thinking about "PermitRootLogin forced-commands-only", perhaps?
Or have you restarted sshd or sent it a "kill -HUP" after making the change?
Or are you confused because it still asks for a password? This is because SSH is designed not to reveal to a potential intruder that trying to log in as root with password authentication is futile: sshd hands over the connection to an Intruder-Time-Waste-o-Mat routine, which requests the password as usual, but even the right password won't be accepted.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2011 03:56 PM
тАО04-29-2011 03:56 PM
Re: ssh PermitRootLogin without-password
"... has the appropriate private key available ..."
Correct - And taken care of.
".. have you restarted sshd or sent it a "kill -HUP" ..."
- yep - same procedure for 105 boxes - only these 19 fail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-01-2011 05:36 AM
тАО05-01-2011 05:36 AM
Re: ssh PermitRootLogin without-password
Still don't know exactly what you mean by
"...they don't stop a ssh -l root hostname."
Does it produce the hostname output
or does it ask for a password?
What behavior exactly are you looking for?
If you have SSH equivalence (shared keys) set up for 'root' between the two servers, then, of course, 'root' would not be queried for a password.
If you have *removed* equivalence, then it will stop and ask for a password.
Then, if the
PermitRootLogin without-password
is set, then the even correct password should fail.
Are you saying that it *accepts* the correct password and allows you to login (or run the command)?
As a side note, I don't see the point of the
PermitRootLogin without-password
(unless you have more than one root user, which I happen to have. see below.
)
If root's are equivalent, then login/command will SUCCEED without asking for pw.
If they are NOT equivalent, then pw will FAIL, so, in effect, root is denied.
How does that differ from
PermitRootLogin no
?
I have two servers "tetty", "kinky",
both with
sshd_config,v 1.59
& OpenSSH_3.6.1p2
.
I have *TWO* root users on each, 'root' and 'rb'.
(I do this to leave 'root' user totally alone.
My 'rb' login is id=0, but he has a different homedir and I can change .profile and other stuff without interfering with the default 'root' account.
)
Equivalence is set up for 'root' between "kinky" & "tetty".
Tetty changed to "without-password" :
tetty ## grep oot /etc/ssh/sshd_config
#PermitRootLogin yes
PermitRootLogin without-password
[root@kinky root]# id
uid=0(root) gid=0(root) ...
[root@kinky root]# ssh root@tetty hostname
tetty
[root@kinky root]# ssh rb@tetty hostname
rb@tetty's password: [correct password entered]
Permission denied, please try again.
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2011 11:46 AM
тАО05-04-2011 11:46 AM
SolutionTo wit:
PermitRootLogin no
denies root all the time, even if keys have been set up for equivalence.
Whereas
PermitRootLogin without-password
allows root, but *only* if keys are set up, or another form of authentication,'
but *not* password authentication;
it will deny even a valid password.
But that doesn't remove our question of what the exact behavior you want and what is actually happening, instead, in those 19 cases :>)
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2011 10:47 AM
тАО05-05-2011 10:47 AM
Re: ssh PermitRootLogin without-password
It was this thread.
And I am very glad you straightened it out.
:-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2011 10:50 AM
тАО05-05-2011 10:50 AM
Re: ssh PermitRootLogin without-password
It looks we will be got in a dilemma of old versions of RHEL incompatible with newer version of SSH and just be red flagging them as odd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2011 10:51 AM
тАО05-05-2011 10:51 AM
Re: ssh PermitRootLogin without-password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2011 10:43 AM
тАО05-06-2011 10:43 AM
Re: ssh PermitRootLogin without-password
Thanks you for your assistance.