Earlier quoted context omitted.
There are many cases where you do not want, or cannot have a password protected ssh trust. For example, say you have a central nagios host monitoring a network, that nagios host needs to connect to remote machines to run interesting monitoring scripts (disk % full, raid controller query, mpio checks, etc), in these cases you do not want to have a password blocking the ssh trust. You will also find this type of thing…
These sound like exactly the cases where you shouldn't use ssh. Use nrpe instead, or run the check on the target machine from cron and make it report back. There's no reason to use ssh for it and at scale ssh adds considerable load to the monitoring host when starting the connection. For continuous deployment you can't easily work around using ssh, but at least the access can be limited to specific commands only.
SSH Kung Fu
31–40 of 133 posts
Re: SSH Kung Fu
#32 PermitRootLogin without-password
instead of 'yes' in /etc/ssh/sshd_config if you absolutely must have ssh root access.Re: SSH Kung Fu
#33My own fix was to use 3G to do the SSH work via a tethered phone and to use the wifi adapter to run the bulk of any other web traffic. It'd be great to have a workaround for DPI, though, if anyone has any experience there.
Re: SSH Kung Fu
#34While we are busy dispensing wisdom: Do use PermitRootLogin without-password instead of 'yes' in /etc/ssh/sshd_config if you absolutely must have ssh root access.
Re: SSH Kung Fu
#35A trick I learned recently: create .ssh/config File format: as many of the following blocks as you like Host $ALIAS You can now ssh to that server as that user by doing "ssh $ALIAS" on the command line, without needing to specify the port or user with the usual command line arguments, or necessarily spell out the entire host name.
scp $ALIAS:/var/log/mylogs/logfile ~/backups/logs/Re: SSH Kung Fu
#36Earlier quoted context omitted.
until one of the millions of other compromised IPs begins hammering your machine minutes later..
That's the whole point. The ban-hammer in this case is automatic and will ban that one too after five attempts or whatever.
Re: SSH Kung Fu
#37While we are busy dispensing wisdom: Do use PermitRootLogin without-password instead of 'yes' in /etc/ssh/sshd_config if you absolutely must have ssh root access.
Re: SSH Kung Fu
#38A trick I learned recently: create .ssh/config File format: as many of the following blocks as you like Host $ALIAS You can now ssh to that server as that user by doing "ssh $ALIAS" on the command line, without needing to specify the port or user with the usual command line arguments, or necessarily spell out the entire host name.
This is excellent advice. The best part is that you can use the same $ALIAS for tools built on SSH, including scp and rsync, like this: scp $ALIAS:/var/log/mylogs/logfile ~/backups/logs/
Re: SSH Kung Fu
#39From the article: > No more password prompts Is that - you ask - because he's using ssh-agent? No, it's because he doesn't tell you you should be using a password-protected key. Some kung fu.
There are many cases where you do not want, or cannot have a password protected ssh trust. For example, say you have a central nagios host monitoring a network, that nagios host needs to connect to remote machines to run interesting monitoring scripts (disk % full, raid controller query, mpio checks, etc), in these cases you do not want to have a password blocking the ssh trust. You will also find this type of thing…
In this case you would limit this ssh-key to only be able to execute the nagios monitoring scripts. Nothing else.
You do this in ~/.ssh/config on the remote machine.
Re: SSH Kung Fu
#40Earlier quoted context omitted.
That's the whole point. The ban-hammer in this case is automatic and will ban that one too after five attempts or whatever.
it still doesn't prevent your logs getting filled up with crap is my point.
Note that I'm not advocating against a port change; just saying that it's the very last of available options, as it's essentialy security-by-obscurity, and thus only gives you a feeling of higher security (due to less spam in the logs).