Notes
GitHub
  • Home
  • SSH
    • Allow a single IP to login
    • Changing the default SSH port
    • Disable root login
    • Setting a Custom SSH Warning Banner
    • Setting up idle timeout
    • Setting up limited password retries
    • Using public/private key pair instead of password
  • Apps
    • Cloud-init
      • Enable SSH password authentication
    • Git
    • Ping
    • Keepalived
    • Rsync
    • Chisel
    • OpenVPN
      • Running OpenVPN connection as a service
    • Redis
  • Linux
    • Package Management
      • Configuring automated security updates
      • Download using fastest mirror
    • Memory
      • Clearing Memory Cache, Buffer and Swap Space
    • Troubleshooting
      • APT
        • Apt-key deprecation warning when updating system
      • Failed to open "/etc/machine-id": No such file or directory
    • Cheat sheet
      • Disk
      • File / Folder
      • Network
      • Process
      • Time
      • Power
    • Network
      • Disable IPv6
      • Network Teaming
      • Set static IP
    • Partition
    • User
      • Change user's default shell
      • Create new user account
  • VMware
    • Hide the fact that running in a VM
    • Datastore conflicts with an existing datastore in the datacenter that has the same URL
    • The OVF package is invalid and cannot be deployed.
  • Windows
    • Domain Controllers
Powered by GitBook
On this page

Was this helpful?

  1. SSH

Changing the default SSH port

  1. Open the /etc/ssh/sshd_config file.

    sudo nano /etc/ssh/sshd_config
  2. Change the SSH port and save the file.

    Port 5333
  3. Restart the SSH server to apply new configuration.

    sudo systemctl restart sshd
  4. Logout of your server and re-login using the new port.

    ssh <user>@<ip_addr> -p 5333

Specify -i if using private key to login.

Last updated 10 months ago

Was this helpful?