📎 AI Summary:
The thread discusses how to assign a default port for SSH connections to a remote server to avoid specifying the port each time in the browser. The original poster asks if it's possible to set a fixed port to streamline the process. The respondent explains how to change the SSH server's default port by editing the `sshd_config` file and restarting the SSH service, offering a practical solution for persistent port configuration.

nilraj

New Member
Joined
Mar 28, 2022
Messages
1
Thread Author #1
Is it possible to assign a port to the localhost. I connect to the remote server using ssh. Every time I have to assign a port number to the ssh connection in order to run in my browser. If I don't do that I get a refused to connect error. i want to assign the port number to the localhost so that every time I run it I don't to assign every time
 

Solution
If you have your ssh server installed, open file explorer, (make sure you are admin), in the path area put, %programdata%\ssh\ , here you will see sshd_config (if I remember right). You can open it in notepad, or in vscode, look for port, change it to the port you want, then save, either reboot or in powershell type , restart-service -name *ssh* -force , then see if you can access via your other machine.

Jlaforce

New Member
Joined
Apr 6, 2022
Messages
5
If you have your ssh server installed, open file explorer, (make sure you are admin), in the path area put, %programdata%\ssh\ , here you will see sshd_config (if I remember right). You can open it in notepad, or in vscode, look for port, change it to the port you want, then save, either reboot or in powershell type , restart-service -name *ssh* -force , then see if you can access via your other machine.
 

Solution