aizu's Knowledge Base
    • Go to: aizu.my Homepage
    • Recent
    • Tags
    • Register
    • Login

    Change SSH Port - Ubuntu

    Linux
    1
    1
    37
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      aizu
      last edited by aizu

      vim /etc/ssh/sshd_config
      

      Modify the Port to new port number (i.e: 23)

      Port 23
      

      Restart ssh service

      /etc/init.d/ssh restart
      

      If not working, modify file below;

      vim /etc/systemd/system/sockets.target.wants/ssh.socket
      

      Modify the "ListenStream" value to target (i.e: 23)

      Restart systemctl daemon & ssh service

      systemctl daemon-reload
      /etc/init.d/ssh restart
      

      Ref: https://askubuntu.com/questions/1483893/unable-to-change-ssh-port-on-ubuntu

      1 Reply Last reply Reply Quote 0
      • First post
        Last post