I'm using ssh class from chilkat to establish an ssh connection. Now i'd like to get the ip address of the underlying transport socket. The function get_ClientIpAddress return always an empty string.
CkSsh myssh;
CkString ip;
myssh.Connect(GetHostName(), 22);
myssh.get_ClientIpAddress(ip);
In the logfile the IP-address is shown:
...
connectInner(47ms):
hostname: server
port: 22
preferRsaHostKeyAlgorithm: 1
sshConnect(16ms):
connectSocket(16ms):
domainOrIpAddress: server
port: 22
connectTimeoutMs: 30000
connect_ipv6_or_ipv4(16ms):
Multi-threaded domain to IP address resolution
resolveHostname6:
maxTimeMs: 30000
--resolveHostname6
connecting to IPV4 address...
ipAddress: 172.16.10.179
createSocket:
Setting SO_SNDBUF size
sendBufSize: 262144
Setting SO_RCVBUF size
recvBufSize: 4194304
--createSocket
connect(16ms):
Waiting for the connect to complete...
connectTimeoutMs: 30000
myIP: 172.16.9.9
myPort: 51375
socket connect successful.
--connect
--connect_ipv6_or_ipv4
--connectSocket