8

I have list of server names in the PuTTY saved sessions. I connected to one session and can know the IP address of the machine connected to using ifconfig for Ubuntu and ipconfig for Windows. But how to know the port number which has been used in to save those sessions in PuTTY while/after connecting?

I tried echo "$SSH_CLIENT" but didn't get the right IP, so, the port might also be wrong.

1

2 Answers 2

4

To answer your literal question: To find an IP address and a port number of the current session:

  • Right click PuTTY console window title;
  • Select Event Log;
  • The very first entry in the log says:

    Connecting to <ip> port <port>
    

    enter image description here


Though in majority of cases the port will be 22, as that's the standard SSH port.

0
8

After spending some time with putty, I figured out myself.

In putty configuration, click name in the Saved Sessions, then click Load button, one can see the port number in the above Port field.

Open Putty -> select Session -> Load -> See the Port Field

Sometimes, simple things just doesn't get easily caught with our eyes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .