Onpening and Closing ports

Chuck Swiger cswiger at mac.com
Mon Feb 12 21:28:00 UTC 2007


On Feb 10, 2007, at 11:37 PM, Dave Carrera wrote:
> Had a little nasty person trying to break my sshd on port 22.
>
> I need to change and open a new port for sshd but i do not know how.
>
> Can one of you kind people help me with this please

If you use good passwords, the SSH dictionary attacks are not a great  
concern.  However, you can pass sshd the "-p 2222" flag to change the  
port from the default of 22 to (for example) 2222.  To make this  
change permanent, add:

    sshd_flags="-p 2222"

...to /etc/rc.conf.

-- 
-Chuck



More information about the freebsd-questions mailing list