Trying here, without success, change the sshd port from 22 to 2222 on Debian 10 "Buster".
Already tried changing /etc/ssh/sshd_config line from # Port 22 to Port 2222, reboot machine, but it didn't worked out.
Already tried changing /etc/services ssh column from 22 to 2222, disabled then reenabled sshd.service, allowed it on iptables and ufw and it keeps on port 22.
Any idea about how to change ssh port 22 to 2222?
:2222? Isssh.socketsystemd unit disabled?Port 2222notport 2222right ?nmapcommand, yes, tried withssh -p 2222 user@hostwith no success and yes,Port 2222instead ofport 2222.Portinsshd_configworked for me. Please add the output ofegrep -v '^#|^$' /etc/ssh/sshd_config(cleared of any sensitive stuff) to your Q. BTW, you should never modify/etc/services-- that's only the business of IANA (and of misguided distro maintainers ;-)).