News for hackers. Stuff that matters.
Re:Bug in widely used OpenSSH opens servers to password crac... by scintill76 on Tuesday July 21, 2015 @08:16PM (#9926853)
I like to do "PermitRootLogin no" as well, but I guess it's not really necessary if one uses some of the other config you've given.
Re:Bug in widely used OpenSSH opens servers to password crac... by thaumaturgy on Tuesday July 21, 2015 @08:29PM (#9926915)
IIRC I think "PermitRootLogin no" is now the default on most distributions. Debian at least: https://debiantalk.wordpress.com/2015/04/27/debian-8-no-root...
Re:Bug in widely used OpenSSH opens servers to password crac... by anonova on Tuesday July 21, 2015 @09:29PM (#9927167)
I was curious, so I checked different distros. Debian-based distros set `without-password`, and others use the default `no`.

  * Arch Linux (openssh-6.9p1-1): #PermitRootLogin no
  * CentOS 7 (openssh-server 6.6.1p1-12.el7_1): #PermitRootLogin yes
  * Debian 8.1 (openssh-server 1:6.7p1-5): PermitRootLogin without-password
  * Fedora 22 (openssh-server 6.9p1-2.fc22): #PermitRootLogin yes
  * openSUSE 13.2 (openssh 6.6p1-5.1.3): #PermitRootLogin yes
  * Ubuntu 14.04.2 (openssh-server 1:6.6p1-2ubuntu1): PermitRootLogin without-password
  * Ubuntu 15.04 (openssh-server 1:6.7p1-5ubuntu1): PermitRootLogin without-password
Re:Bug in widely used OpenSSH opens servers to password crac... by scintill76 on Tuesday July 21, 2015 @10:59PM (#9927499)
Thanks for checking, but I'm not sure you're correct. AFAICT setting the default to "no" is not due for official release until later this month[1]. Maybe some of the distros are patching the upstream default directly in their source (seems bad idea to me), but I at least checked the CentOS version you referenced and it appears to default to "yes" in the source (and the config excerpt you cited is commented out.)

I looked into OpenSSH's commit history ([2],[3],[4],[5]) and it looks like some waffling and/or release-process side-effects resulted in the man page in 6.9 saying the default is "no", but the actual code retaining "yes" (confirmed in the portable 6.9p1 tarball). I kind of hope I'm wrong somehow; this is a bit disturbing.

[1] http://www.openssh.com/txt/release-6.9 [2] https://github.com/openssh/openssh-portable/commit/88a7c598a... [3] https://github.com/openssh/openssh-portable/commit/d921082ed... [4] https://github.com/openssh/openssh-portable/commit/47aa7a0f8... [5] https://github.com/openssh/openssh-portable/commit/7de4b03a6...

Re:Bug in widely used OpenSSH opens servers to password crac... by anonova on Tuesday July 21, 2015 @11:58PM (#9927656)
Ah, you're right. I read sshd_config(5) on Arch, which uses 6.9p1 and says the incorrect default is "no". I assumed this was the case on other distros.

So to correct my previous post (I can't seem to edit?), it should be, "Debian-based distros set `without-password`, and others use the default `yes`."

Thanks for the correction!

Re:Bug in widely used OpenSSH opens servers to password crac... by scintill76 on Wednesday July 22, 2015 @12:42AM (#9927772)
Thanks for the reply. On editing, I'm not sure exactly how it works, but posts on HN become uneditable at some point.

I came across this post[1] and bug comment[2]. If I'm understanding correctly, Red Hat will not follow the OpenBSD upstream on this! So I would guess CentOS and Fedora will also keep allowing root login, with password, by default.

[1] https://lists.fedoraproject.org/pipermail/package-announce/2... [2] https://bugzilla.redhat.com/show_bug.cgi?id=89216#c26

Re:Bug in widely used OpenSSH opens servers to password crac... by protomyth on Tuesday July 21, 2015 @08:47PM (#9926986)
Just got set to the default on OpenBSD, so it should be shipped in 5.8.
Re:Bug in widely used OpenSSH opens servers to password crac... by chmielewski on Thursday July 23, 2015 @05:06PM (#9938521)
The reason for this isn't security-related, if you've followed the steps above and have applied them to root. The reason to not allow root login is so that each of multiple administrators must login using their username and then become root or use sudo. That way if you look to see who did what, you get a username rather than "root did that". Which, of course, you usually need root to do things that end up being checked into.
Re:Bug in widely used OpenSSH opens servers to password crac... by scintill76 on Friday July 24, 2015 @03:19AM (#9940516)
I would say auditability is still security-related, but yes, this is good practice too. You should probably also make sure root has a locked password, so that things other than SSH won't allow root login.