Skip to content

Instantly share code, notes, and snippets.

@xardit
Created July 5, 2024 06:28
Show Gist options
  • Save xardit/63c7b5a57f0bc2c58b43e07dee66cf5c to your computer and use it in GitHub Desktop.
Save xardit/63c7b5a57f0bc2c58b43e07dee66cf5c to your computer and use it in GitHub Desktop.
Ubuntu 24 change SSH port

Ubuntu 24 change SSH port

Steps to change ssh listening port

  1. Change stream port
vi /lib/systemd/system/ssh.socket
  1. Change port on sshd_config
vi /etc/ssh/sshd_config
  1. Restart services
systemctl daemon-reload
systemctl restart ssh.service
systemctl restart ssh.socket
  1. Done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment