Port setting - WeOnlyDo Discussion board

Port setting (wodSSH / wodSSH.NET)

by Luis Llorens, Wednesday, August 16, 2023, 21:50 (255 days ago)

I am having a problem with the wodSSH.Port setting. Our configuration changed from Port #22 to Port #2222 and now the wodSSH client does not connect. I did some Wireshark captures and we see that the port # never changes, it is always 22. Seems like it never worked since i was always using port #22.

Any ideas?

Here is the setup:

wodSSH.Login = user;
wodSSH.Password = pass;
wodSSH.Hostname = host;
wodSSH.Port = "2222";
wodSSH.Timeout = "10000";
wodSSH.Blocking = "1";
wodSSH.Protocol = "4";
wodSSH.Command = command;

wodSSH.Connect();

Here is the Wireshark capture of the failure:

1 0.000000 Dell_9c:4e:88 Broadcast ARP 42 Who has 192.168.0.254? Tell 192.168.0.100
2 0.624756 Dell_9c:4e:88 Broadcast ARP 42 Who has 192.168.0.254? Tell 192.168.0.100
3 1.625510 Dell_9c:4e:88 Broadcast ARP 42 Who has 192.168.0.254? Tell 192.168.0.100
4 6.994287 192.168.0.100 192.168.0.1 TCP 66 65457 → 22 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 WS=256 SACK_PERM
5 6.996037 192.168.0.1 192.168.0.100 TCP 66 22 → 65457 [SYN, ACK] Seq=0 Ack=1 Win=64240 Len=0 MSS=1460 SACK_PERM WS=128
6 6.996115 192.168.0.100 192.168.0.1 TCP 54 65457 → 22 [ACK] Seq=1 Ack=1 Win=262656 Len=0
7 6.996346 192.168.0.100 192.168.0.1 SSHv2 83 Client: Protocol (SSH-1.99-WeOnlyDo 3.1.5.243)
8 6.997517 192.168.0.1 192.168.0.100 TCP 60 22 → 65457 [ACK] Seq=1 Ack=30 Win=64256 Len=0
9 7.023576 192.168.0.1 192.168.0.100 SSHv2 75 Server: Protocol (SSH-2.0-OpenSSH_8.8)
10 7.070505 192.168.0.100 192.168.0.1 TCP 54 65457 → 22 [ACK] Seq=30 Ack=22 Win=262656 Len=0
11 7.072304 192.168.0.1 192.168.0.100 SSHv2 1086 Server: Key Exchange Init
12 7.072561 192.168.0.100 192.168.0.1 SSHv2 1390 Client: Key Exchange Init
13 7.073586 192.168.0.1 192.168.0.100 TCP 60 22 → 65457 [ACK] Seq=1054 Ack=1366 Win=64128 Len=0
14 7.074886 192.168.0.100 192.168.0.1 SSHv2 134 Client: Elliptic Curve Diffie-Hellman Key Exchange Init
15 7.076575 192.168.0.1 192.168.0.100 TCP 60 22 → 65457 [ACK] Seq=1054 Ack=1446 Win=64128 Len=0
16 7.108806 192.168.0.1 192.168.0.100 SSHv2 1266 Server: Elliptic Curve Diffie-Hellman Key Exchange Reply, New Keys
17 7.115215 192.168.0.100 192.168.0.1 SSHv2 70 Client: New Keys
18 7.115314 192.168.0.100 192.168.0.1 SSHv2 122 Client:
19 7.117006 192.168.0.1 192.168.0.100 TCP 60 22 → 65457 [ACK] Seq=2266 Ack=1462 Win=64128 Len=0
20 7.117006 192.168.0.1 192.168.0.100 TCP 60 22 → 65457 [ACK] Seq=2266 Ack=1530 Win=64128 Len=0
21 7.117219 192.168.0.1 192.168.0.100 SSHv2 122 Server:
22 7.117643 192.168.0.100 192.168.0.1 SSHv2 138 Client:
23 7.118440 192.168.0.1 192.168.0.100 TCP 60 22 → 65457 [ACK] Seq=2334 Ack=1614 Win=64128 Len=0
24 7.124704 192.168.0.1 192.168.0.100 SSHv2 138 Server:
25 7.125061 192.168.0.100 192.168.0.1 SSHv2 154 Client:
26 7.125811 192.168.0.1 192.168.0.100 TCP 60 22 → 65457 [ACK] Seq=2418 Ack=1714 Win=64128 Len=0
27 7.128417 192.168.0.1 192.168.0.100 SSHv2 138 Server:
28 7.128773 192.168.0.100 192.168.0.1 SSHv2 122 Client:
29 7.129470 192.168.0.1 192.168.0.100 TCP 60 22 → 65457 [ACK] Seq=2502 Ack=1782 Win=64128 Len=0
30 7.157394 192.168.0.1 192.168.0.100 SSHv2 138 Server:
31 7.158055 192.168.0.100 192.168.0.1 TCP 54 65457 → 22 [FIN, ACK] Seq=1782 Ack=2586 Win=262400 Len=0
32 7.160014 192.168.0.1 192.168.0.100 TCP 60 22 → 65457 [FIN, ACK] Seq=2586 Ack=1783 Win=64128 Len=0
33 7.160053 192.168.0.100 192.168.0.1 TCP 54 65457 → 22 [ACK] Seq=1783 Ack=2587 Win=262400 Len=0
34 8.001068 Dell_9c:4e:88 Broadcast ARP 42 Who has 192.168.0.254? Tell 192.168.0.100

Port setting

by Jasmine, Wednesday, August 16, 2023, 21:56 (255 days ago) @ Luis Llorens

Hi Luis,

can you try to set Port property after you set Protocol property, since setting Protocol property reverts Port to default value for selected protocol?

Regards,
Jasmine

Port setting

by Luis Llorens, Thursday, August 17, 2023, 10:22 (254 days ago) @ Jasmine

Hi Luis,

can you try to set Port property after you set Protocol property, since setting Protocol property reverts Port to default value for selected protocol?

Regards,
Jasmine

Hi Jasmine,

Yes, that worked. Thanks for the quick response. For future reference, where can I get descriptions of the setup parameters?

Regards.

-luis

Port setting

by Jasmine, Thursday, August 17, 2023, 11:22 (254 days ago) @ Luis Llorens

Hi.

Can you be more specific about setup parameters? You can consult our help file with all the properties that you can set before/after making the connection.

Regards,
Jasmine