News for hackers. Stuff that matters.
Re:SSH Tricks by ary on Sunday September 18, 2011 @10:47PM (#3012011)
> /dev/null .known_hosts

This is not a good idea (and far from "awesome"). I get why he's doing it, but suggesting that weakening the security of a tool that is meant to enhance it is bad advice.

Re:SSH Tricks by peterwwillis on Sunday September 18, 2011 @10:54PM (#3012025)
Eh... bad advice in general, but awesome advice for the case he's using it in. Like he says in the post: Don't set these values for hosts that you actually care about.
Re:SSH Tricks by yock on Monday September 19, 2011 @08:58AM (#3013326)
It doesn't seem like a good idea at all. SSH caches those keys because computers are more capable of flawlessly comparing long strings of random characters than humans are. The cache is so that you, presumably a human, don't need to compare the reported host key to its known value each time you connect.

I understand his specific application, and why it works for him, but including it as advice for the general SSH-consuming public is nuts.

Re:SSH Tricks by JoachimSchipper on Monday September 19, 2011 @05:19AM (#3012884)
Or hosts that you use passwords on that you actually care about. Or hosts that have access to a network you care about. Or...

There's just too much that can go wrong.

Re:SSH Tricks by atakan_gurkan on Monday September 19, 2011 @08:09AM (#3013204)
I think "hosts that you care about" captures them all. Yes, there is too much that can go wrong, but for this tiny case the advice is useful. Let me quote GJ Sussman: "It is OK if it is not user-friendly, I am not a user".
Re:SSH Tricks by dlsspy on Sunday September 18, 2011 @11:13PM (#3012070)
Security advice from someone making it easier to login as root on boxes...

The first things I do with sshd on any machine are 1) disable remote root login and 2) disable password login.

Re:SSH Tricks by mkramlich on Monday September 19, 2011 @12:16AM (#3012213)
same here

plus move it to a high non-standard port

Re:SSH Tricks by pestaa on Monday September 19, 2011 @06:46AM (#3013038)
But security through obscurity... oh, wait, you actually secured the box!
Re:SSH Tricks by wglb on Monday September 19, 2011 @09:06AM (#3013363)
I move the port after doing the stuff he notes above, but it is for reducing the junk in the log about failed logins.
Re:SSH Tricks by bradleyland on Monday September 19, 2011 @09:23AM (#3013422)
Seconded!

Our fail2ban processes were using a not-insignificant amount of resources while sshd was listening on port 22. Moving to a high port shifted it to somewhere in the "dead last" range in the CPU time column.

Re:SSH Tricks by JoshTriplett on Sunday September 18, 2011 @11:31PM (#3012106)
You should never do it in general; however, it makes great sense for the specific case mentioned in the article: a test system on an internal network which frequently gets reinstalled and thus re-keyed.
Re:SSH Tricks by peterjmag on Sunday September 18, 2011 @10:55PM (#3012027)
Agreed. I always found strict host key checking a bit annoying, and then it saved my butt a couple years ago. The other tips seem great though.
Re:SSH Tricks by bostonvaulter2 on Sunday September 18, 2011 @11:36PM (#3012120)
How did SSH strict host key checking save your butt? Was the host compromised?
Re:SSH Tricks by dotBen on Sunday September 18, 2011 @11:44PM (#3012142)
Can't answer for peterjmag, but DNS spoofing is more prevalent than ever (certainly compared to when host key checking was built into the SSH spec) - I'm thinking about WiFi Hotspot login pages that pretend to live at any domain you type in, things like that.

It's host key checking that stops you typing in your root password into a different server that isn't who it says it is.

Re:SSH Tricks by nddrylliog on Monday September 19, 2011 @01:00AM (#3012341)
I was under the impression that connecting as root via ssh was a bad idea in general, ie. that it was better to connect as an unprivileged user and then su. What are your thoughts on that?
Re:SSH Tricks by darrikmazey on Monday September 19, 2011 @03:28AM (#3012678)
I always disable remote root login and password authentication. Then I create purpose-specific remote users with sudo access only to the commands they need (and never access to sudo su). This is not only more security-conscious in my mind, but also allows me to just drop a friend or coworker's public key in the authorized_keys file for a certain user to allow that person to perform the function that user was purposed for (for instance, when I'm on vacation).
Re:SSH Tricks by dotBen on Monday September 19, 2011 @09:26AM (#3013430)
Ok, or any other user account then - you're right you should disable root login, I was just using it as example