|
ssh is the standard protocol used when you want to access a shell on a
remote machine. By remote, I mean you are not sitting in front of the console.
Remote may mean next door, the next building, or the next continent. ssh
is a secure method for talking to that computer.
ssh is also a common attack vector. There are many scripts that can be
used to attempt to break in via ssh. As a general rule, I greatly
restrict access via my packet filter rules. I allow incoming connections only
from my other servers, my home, and a few trusted hosts and friends.
At worst, this reduces the number of spurious log-in attempts recorded in my logs.
At best, it reduces the risk.
However, there are some instances when I am not at one of these trusted locations
and I still need to ssh in. This is why I also run sshd, unfiltered,
on a high random port. This article shows the configuration I used to
achieve this.
NOTE: If all you want is sshd listening on another port, the configuration below
is overkill. If that case, you probabaly want something like this:
# grep ListenAddress /etc/ssh/sshd_config
ListenAddress 10.2.3.4:22
ListenAddress 10.2.3.4:44444
However, if you want the second sshd to have a different configuration, such as
only permit public key authorization, then this article is for you.
|