[CentOS] Moving sshd listen port

Wed Jul 9 15:45:51 UTC 2014
Robert Moskowitz <rgm at htt-consult.com>

On 07/09/2014 10:50 AM, Mike McCarthy, W1NR wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> This was a "minimal" install for a virtual server and semanage is not
> available so the command doesn't work...
>
> What package is semanage in?

Had to dig back in my notes:

policycoreutils-python

>
> Mike
>
> On 07/09/2014 10:45 AM, Jonathan Billings wrote:
>> On Wed, Jul 09, 2014 at 10:35:12AM -0400, Mike McCarthy, W1NR wrote:
>>> I am having a problem getting sshd to run after changing it's default
>>> port. I edit sshd_config and set the desired port, open it with
>>> firewall-cmd and then issue a systemctl start sshd. No error gets
>>> reported on the console but the following is logged in /var/messages
>>>
>>>      sshd.service: main process exited, code=exited, status=255/n/a
>>>
>>> Not a very helpful error message. Sounds like I should report a bug?
>> If you have SELinux enabled, it will block sshd from listening on a
>> port other than what is described in the policy.  You can add the
>> additional port by running:
>>
>> semanage port -a -t ssh_port_t -p tcp $PORTNUM
>>
>> (replace $PORTNUM with the new port number you chose)
>>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.22 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEARECAAYFAlO9VsEACgkQW1M1BMdnYxmY1wCeNU+Jzf3bdoglIox15IxEuBF1
> d/gAoMYocoFEh73K5l2VeBhhsg/vsUdu
> =5Sio
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>