can someone please give a hint what else may be wrong. System Almalinux9, located at VPS. I wanted to change a port of SSHD to 60022, but when i try to connect to it, it does not respond anyhow when i'm trying to connect: "Network error: connection timeout". Thanks
added to sshd_config
a separate line
Port 60022
Port 22
ss -lntp | grep ssh
LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=933,fd=3))
LISTEN 0 128 0.0.0.0:60022 0.0.0.0:* users:(("sshd",pid=933,fd=5))
LISTEN 0 128 [::]:22 [::]:* users:(("sshd",pid=933,fd=4))
LISTEN 0 128 [::]:60022 [::]:* users:(("sshd",pid=933,fd=6))
semanage port -a -t ssh_port_t -p tcp 60022
se is in permissive mode atm
semanage port -l | grep ssh
ssh_port_t tcp 60022, 22
added firewall-cmd --zone=public --permanent --add-port=60022/tcp
firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: eth0
sources:
services: cockpit dhcpv6-client ssh
ports: 60022/tcp 22/tcp
protocols:
forward: yes
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
tried to remove ssh service from firewall, but did not help.
fail2ban
listens to both ports and is not a problem
iptables -L -n -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
4291 414K f2b-sshd tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 22,60022
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination