Re: Running SSH on a different port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Change the port statement in /etc/ssh/sshd_config and restart sshd

Alternatively, you can make a port direction on your firewall, say,
from TCP port 1234 to internal IP 22.  Then, you don't need to change
the server config.

My 2 cents.

Stephen WONG @ Hong Kong



On Sat, Oct 24, 2009 at 9:23 PM, Oliver Ransom <oliver@xxxxxxxxxxxxx> wrote:
>
> On 24/10/2009, at 11:40 PM, Miguel Medalha wrote:
>
>>
>>> How does one switch ssh ports? What is a good port to use? What
>>> ramifications does it have when I need to ssh in? Is it as simple as
>>> ssh user@hots:port?
>>>
>>
>> In /etc/ssh/sshd_config replace "port 22" with "port <whatever high
>> port
>> (> 1024) you like>"
>>
>> Then configure your ssh clients accordingly.
>>
>> I was having my logs filled with *literally* hundreds of connection
>> attempts to port 22 every single day. Since I moved ssh to another
>> port
>> that stopped.
>
> I don't know if it is viable in your case but using /etc/hosts.allow
> and deny helps if you know what IPs are going to need SSH access.
>
>>
>> Also, disable password authentication and use public/private key pairs
>> as certification.
>>
>> _______________________________________________
>> CentOS mailing list
>> CentOS@xxxxxxxxxx
>> http://lists.centos.org/mailman/listinfo/centos
>
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
>
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux