How to change WebSSH Port?

Last updated February 17, 2026

Introduction

In this short article, we’ll go through how to change the WebSSH port. With this you’ll be able to use WebSSH with any custom port instead of using the SSH default port.

Changing the default SSH port

SSH server by default uses port 22 to create connections and everyone knows about it. Therefore using port 22 for SSH server makes your server, in theory, more vulnerable to hackers. In this guide, we will set up port 5333 for SSH server. You can use any unused port.

Please note: Make sure you open the new port before closing the old one.

Warning: Changing the SSH port will break our Web SSH Terminal functionality which assumes SSH is on the default port. You need to change the WebSSH port in the shell users screen to the port you use in the sshd_config file for WebSSH to work.

In case of a Webdock perfect server stack where we have ufw installed, open port 5333.

$ sudo ufw allow 5333/tcp

Open the /etc/ssh/sshd_config file.

$ sudo nano /etc/ssh/sshd_config

And change the SSH port.

Port 5333

Finally restart the daemon and the ssh socket for the changes to take effect

$ sudo systemctl daemon-reload
$ sudo systemctl restart ssh.socket

Logout of your server and re-login using port 5333.

$ ssh admin@[IP-address] -i [path-to-private-key] -p 5333

Conclusion

That’s it. With this change you can SSH into your server with WebSSH on a custom port!

In case you need assistance here feel free to contact Webdock Support. We’ll be happy to assist you.

Related Articles

Content
expand_more
chat box icon
Close
combined chatbox icon

Welcome to our Chatbox

Reach out to our Support Team or chat with our AI Assistant for quick and accurate answers.
webdockThe Webdock AI Assistant is good for...
webdockChatting with Support is good for...