Change the remote port to 22 (52623) in Ubuntu Print

  • 2342

systemctl disable --now ssh.socket

rm -f /etc/systemd/system/ssh.service.d/00-socket.conf

rm -f /etc/systemd/system/ssh.socket.d/addresses.conf

systemctl daemon-reload

systemctl enable --now ssh.service

sed -i -e 's/#Port 22/Port 52623/g' /etc/ssh/sshd_config

sed -i -e 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config

systemctl restart sshd.service

systemctl restart ssh.service

ufw allow 52623/tcp


Was this answer helpful?

« Back