You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fails and you get the following in your logs on CentOS servers when sshd is restarted by the handler:
May 20 02:34:00 ip-172-31-91-174 polkitd[517]: Registered Authentication Agent for unix-process:1588:20133 (system bus name :1.29 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
May 20 02:34:00 ip-172-31-91-174 sshd[1594]: error: Bind to port 2849 on 0.0.0.0 failed: Permission denied.
May 20 02:34:00 ip-172-31-91-174 sshd[1594]: error: Bind to port 2849 on :: failed: Permission denied.
May 20 02:34:00 ip-172-31-91-174 sshd[1594]: fatal: Cannot bind any address.
May 20 02:34:00 ip-172-31-91-174 polkitd[517]: Unregistered Authentication Agent for unix-process:1588:20133 (system bus name :1.29, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
You have to grant the privilege via SELinux: semanage port -a -t ssh_port_t -p tcp 4444
So on Red Hat / CentOS, the following task should be added prior to the lineinfile task:
- name: Allow sshd to listen on tcp port 2849.seport:
ports: 2849proto: tcpsetype: ssh_port_tstate: present
The text was updated successfully, but these errors were encountered:
The current example:
Fails and you get the following in your logs on CentOS servers when
sshd
is restarted by the handler:You have to grant the privilege via SELinux:
semanage port -a -t ssh_port_t -p tcp 4444
So on Red Hat / CentOS, the following task should be added prior to the
lineinfile
task:The text was updated successfully, but these errors were encountered: