Invalid Port number PuTTy. exe error message

Asked By 0 points N/A Posted on -

Here comes a strange error message with PuTTY.exe. I have been using it for so many remote connections before. I try to just click on PuTTy.exe and then enter the remote host and the connection is established.  

When I try to connect it through the command prompt, I am not able to establish a connection between the server and host.

I am getting an error message:

Invalid Port Number

When I try the same connection with Putty.exe, I don’t have any issues. Not sure what  the problem could be.

Answered By 0 points N/A #86296

Invalid Port number PuTTy. exe error message


Putty has two sort of port that you usually need to enter once when there is tunneling and other when you want to connect to remotely. This error is because of invalid port you entered. There are two reasons for this error.

1. There is a range of valid port numbers on any pc i. e. from 1 to 65535.

2. There are ports which are reserve for different protocols like TCP/IP runs over port 80 and applications. Kindly use to the port number greater than 1024 for tunneling and use appropriate port when try to connect remotely. 

You should enter the port number keeping this in mind. 

The first picture shows the port which is in use among the reserved ports like 22 used for SSH connection unsigned given IP while second picture shows the port for tunneling.


Thank you.


Answered By 590495 points N/A #311292

Invalid Port number PuTTy. exe error message


That’s an “Invalid port number” error which means the port number you want to connect to may be incorrect or there is no such port number. First, check that the port number you want to connect to exists and is configured to receive connections. Also, check the syntax of the command you entered. Check that the combinations of switches and options are valid.

Here’s an example how to start an SSH session with putty. First, click “Start”, “All Programs”, “Accessories” then “Command Prompt”. In the command prompt window, type without quotes “putty.exe –ssh [email protected] 22” then hit Enter. Make sure you include the complete path where the “putty.exe” file is located. The “-ssh” switch sets the SSH connection type. The connection types you can use are “-ssh”, “-telnet”, “-rlogin”, and “-raw”.

Replace “root” with your username, “” with your server’s IP address, and “22” with the port number you want to connect to.

Related Questions