User Tools

Site Tools


ubuntu:ssh:change_the_port

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ubuntu:ssh:change_the_port [2025/05/21 09:38] peterubuntu:ssh:change_the_port [2025/05/21 09:41] (current) peter
Line 5: Line 5:
 <file bash /etc/ssh/sshd_config> <file bash /etc/ssh/sshd_config>
 Port <change to another port other than 22> Port <change to another port other than 22>
-PermitRootLogin no 
 </file> </file>
  
Line 13: Line 12:
  
 <code bash> <code bash>
 +sudo systemctl restart ssh
 +
 +or
 +
 sudo /etc/init.d/ssh restart sudo /etc/init.d/ssh restart
 </code> </code>
 +
 +----
 +
 +<WRAP TIP>
 +**NOTE:**  Remember to update firewall rules accordingly and ensure the new port is not used by another service.
 +</WRAP>
  
ubuntu/ssh/change_the_port.1747820286.txt.gz · Last modified: 2025/05/21 09:38 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki