[CentOS] Running SSH on a different port

Sat Oct 24 14:46:11 UTC 2009
Tait Clarridge <tait at clarridge.ca>

On Sat, 2009-10-24 at 07:17 -0700, ML wrote:
> >>> In /etc/ssh/sshd_config replace "port 22" with "port <whatever high
> >>> port
> >>> (> 1024) you like>"
> >>>
> >>> Then configure your ssh clients accordingly.
> >>
> >> So I added Port 2977 Under Host *
> >>
> >> So I have:
> >> Host *
> >> Port 2977
> >>
> >> I rebooted and I get a connection refused now when I try to connect.
> >>
> >> I am doing: ssh -p 2977 user at ip
> 
> My firewall is set to allow 2977.
> 
> Just for shits I changed this to 29770
> 
> I ran: system-config-securitylevel-tui and customized and added  
> 29770:tcp to other ports
> 
> I then: nano /etc/ssh/ssh_config and said Port 29770
> 
> So that I have:
> Host *
> Port 29770
> Protocol 2
> 
> I then did: service sshd restart
> 
> and I still get connection refused. Comment out Port 29770 and all is  
> well again.

Have you restarted the ssh daemon after changing the config file?

Also, have you restarted the iptables service after changing the
firewall rules?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.centos.org/pipermail/centos/attachments/20091024/686cdc94/attachment-0005.sig>