News for hackers. Stuff that matters.
Re:How I spend my first 5 minutes on a server by tomp on Monday March 04, 2013 @03:56AM (#5317345)
Sure. It's only meant to stop automated script-kiddie attacks that target all open SSH servers on the internet. Less logs, less disk usage, ...
Re:How I spend my first 5 minutes on a server by drivebyacct2 on Monday March 04, 2013 @03:57AM (#5317351)
Wouldn't the script-kiddie through those hosts into a queue to run a more advanced port scan on? I mean, I see your point, but it seems highly useless compared to, say, simply disabling the password based authentication.
Re:How I spend my first 5 minutes on a server by lmm on Monday March 04, 2013 @04:06AM (#5317377)
Why would they bother? Script-kiddie is just playing the numbers, any machine with a slightly non-default configuration is not worth the effort.

Disabling password authentication is better for "real" security, but doesn't stop those dictionary attacks spamming your logfile. (I still feel there should be better solutions to that problem than changing the port though)

Re:How I spend my first 5 minutes on a server by justinmk on Monday March 04, 2013 @05:56PM (#5321592)
> I still feel there should be better solutions to that problem than changing the port

Well, there is port knocking. http://www.thoughtcrime.org/software/knockknock/

Re:How I spend my first 5 minutes on a server by drivebyacct2 on Monday March 04, 2013 @04:32AM (#5317450)
I guess my response to all of these is... using key based auth is so much more secure than changing the port that changing the port seems to me, completely, pointless. Especially considering that:

- password auth = me having to type my password everytime, likely to have a less secure password

- key based auth = me never having to type it in, with a key length so long that it's completely inconceivable it'll be cracked or collided or brute forced

and then when you change the port, the only "advantage" I get is that I now have to remember the port because they're already not getting in by virtue of key-based auth.

Re:How I spend my first 5 minutes on a server by lenazegher on Monday March 04, 2013 @07:04AM (#5317807)
> using key based auth is so much more secure than changing the port

Is it really? Once you get to a sensible password length (say, >14 characters) haven't you effectively made brute force and dictionary attacks impossible anyway?

> password auth = me having to type my password everytime, likely to have a less secure password

If you use a password often enough, I find the time difference between an 8 character and a 16 character password immeasurably small. It's all muscle memory anyway.

>key based auth = me never having to type it in

Perhaps I'm clinging to a false sense of security, but I find the idea of anyone with access to my local machine being able to access my server with 0 additional credentials really disconcerting.

Perhaps in the theoretical world if they can access your machine it's game over anyway because they can install a keylogger. In the real world, I think there's a fairly large population of people who might access your server who wouldn't/couldn't install a keylogger to steal your password.

Re:How I spend my first 5 minutes on a server by jackalope on Monday March 04, 2013 @08:11AM (#5317994)
Your private key should have a strong passphrase. I agree that using a passphrase-less key is bad practice. As for keyloggers, once they obtain your password, they have succeeded. But after obtaining a key's passphrase (which you normally only type in once a local session if using ssh-agent), they still need the key, which may or may not be marginally harder. It's still another step to overcome. So, even if it can be shown to be only a narrow improvement over passwords under certain circumstances, it's a big win in convenience and even security under normal circumstances if done properly. Give it a try, finetune your ~/.ssh/config and you might end up loving it.
Re:How I spend my first 5 minutes on a server by majelix on Monday March 04, 2013 @07:49AM (#5317915)
> but I find the idea of anyone with access to my local machine being able to access my server with 0 additional credentials really disconcerting.

You could hook whatever locks your screen to also clear your ssh-agent then. This is probably something like alias xlock=$(ssh-agent -k && xlock) in linux.

You do lock your screen, right?

Re:How I spend my first 5 minutes on a server by moe on Monday March 04, 2013 @08:35AM (#5318081)
The answer is really easy: You should do both.

Disable password auth for root, and change the SSH port.

Re:How I spend my first 5 minutes on a server by lmm on Monday March 04, 2013 @02:17PM (#5320107)
The advantage of changing the port is to reduce the spam in your logs. Checking your server logs regularly really does increase your real-world security.
Re:How I spend my first 5 minutes on a server by crdoconnor on Monday March 04, 2013 @04:09AM (#5317384)
Imagine how long it would take to scan every port between 1 and 65535 on millions of machines.

Versus how long it would take to just try port 22 on millions of machines.

It wouldn't stop a determined hacker for more than a few minutes, but it will reduce the number of automated attacks on ssh essentially to zero.

Re:How I spend my first 5 minutes on a server by stinos on Monday March 04, 2013 @08:08AM (#5317979)
this. Everytime I check my logs there's tons of failed tries to port 22 yet none to the port ssh actually runs on. Which keeps the log with failed logins clean.
Re:How I spend my first 5 minutes on a server by lotsofcows on Monday March 04, 2013 @04:23AM (#5317431)
They don't seem to. Plus, if they hit more than 5 ports their ip gets blocked. Plus it keeps crap out of my logs...