Tunnel port automatically set to 50000 - even multiple connections

Advertisement

yngiwulf
Joined:
Posts:
1

Tunnel port automatically set to 50000 - even multiple connections

When I am using WinSCP to connect to a server using tunnel, it is set to automatically grab a port. It grabs port 50000, even when it would seem another session has already grabbed 50000. Then, both sessions fail. How can this be prevented?
Here is the WinSCP log. In it, you can see that both Session1 and Session2 are running at the same time and both selected port 50000

> 2019-04-24 07:00:01.930 Script: open sftp://session1:***@ftp.session1.com -hostkey="*" -timeout=15 -rawsettings Tunnel="1" TunnelHostName="TunnelForSFTP.myco.com" TunnelUserName="TunnelUser" TunnelPortNumber="50022" TunnelPublicKeyFile="E:\SSHRelay\TheKey.ppk" TunnelHostKey="ssh-ed25519 256 c8:9f:ca:46:c7:4c:d9:99:70:5d:58:9e:93:a7:a2:6e"
< 2019-04-24 07:00:01.930 Script: reconnecttime 120
. 2019-04-24 07:00:01.930 --------------------------------------------------------------------------
> 2019-04-24 07:00:01.930 Script: open sftp://Session2:***@sftp.session2.com:22 -hostkey="*" -timeout=15 -rawsettings Tunnel="1" TunnelHostName="TunnelForSFTP.myco.com" TunnelUserName="TunnelUser" TunnelPortNumber="50022" TunnelPublicKeyFile="E:\SSHRelay\TheKey.ppk" TunnelHostKey="ssh-ed25519 256 c8:9f:ca:46:c7:4c:d9:99:70:5d:58:9e:93:a7:a2:6e"
. 2019-04-24 07:00:01.930 --------------------------------------------------------------------------
. 2019-04-24 07:00:01.930 Host name: ftp.Session1.com (Port: 22)
. 2019-04-24 07:00:01.930 Session name: Session1@sftp.Session1.com (Ad-Hoc site)
. 2019-04-24 07:00:01.930 Host name: sftp.Session1.com (Port: 22)
le: No)
....
. 2019-04-24 07:00:01.930 Tunnel: Local port number: 0
. 2019-04-24 07:00:01.930 Ping type: Off, Ping interval: 30 sec; Timeout: 15 sec
. 2019-04-24 07:00:01.930 Transfer Protocol: SFTP
. 2019-04-24 07:00:01.930 Disable Nagle: No
. 2019-04-24 07:00:01.930 Proxy: None
f, Ping interval: 30 sec; Timeout: 15 sec
. 2019-04-24 07:00:01.930 Disable Nagle: No
. 2019-04-24 07:00:01.930 Send buffer: 262144
. 2019-04-24 07:00:01.930 Proxy: None
. 2019-04-24 07:00:01.930 Send buffer: 262144
2; Compression: No
. 2019-04-24 07:00:01.930 Bypass authentication: No
. 2019-04-24 07:00:01.930 SSH protocol version: 2; Compression: No
. 2019-04-24 07:00:01.930 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2019-04-24 07:00:01.930 Bypass authentication: No
. 2019-04-24 07:00:01.930 Ciphers: aes,chacha20,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2019-04-24 07:00:01.930 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2019-04-24 07:00:01.930 KEX: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2019-04-24 07:00:01.930 Ciphers: aes,chacha20,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2019-04-24 07:00:01.930 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2019-04-24 07:00:01.930 KEX: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2019-04-24 07:00:01.930 Simple channel: Yes
. 2019-04-24 07:00:01.930 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2019-04-24 07:00:01.930 Return code variable: Autodetect; Lookup user groups: Auto
. 2019-04-24 07:00:01.930 Simple channel: Yes
. 2019-04-24 07:00:01.930 Shell: default
. 2019-04-24 07:00:01.930 Return code variable: Autodetect; Lookup user groups: Auto
. 2019-04-24 07:00:01.930 Shell: default
to
. 2019-04-24 07:00:01.930 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2019-04-24 07:00:01.930 EOL: LF, UTF: Auto
. 2019-04-24 07:00:01.930 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2019-04-24 07:00:01.930 SFTP Bugs: Auto,Auto
. 2019-04-24 07:00:01.930 SFTP Server: default
n: Yes, Scp1 Comp: No
. 2019-04-24 07:00:01.930 SFTP Bugs: Auto,Auto
. 2019-04-24 07:00:01.930 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2019-04-24 07:00:01.930 SFTP Server: default
. 2019-04-24 07:00:01.930 Cache directory changes: Yes, Permanent: Yes
. 2019-04-24 07:00:01.930 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2019-04-24 07:00:01.930 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2019-04-24 07:00:01.930 Cache directory changes: Yes, Permanent: Yes
. 2019-04-24 07:00:01.930 DST mode: Unix
. 2019-04-24 07:00:01.930 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2019-04-24 07:00:01.930 --------------------------------------------------------------------------
. 2019-04-24 07:00:01.930 DST mode: Unix
. 2019-04-24 07:00:01.930 Opening tunnel.
. 2019-04-24 07:00:01.930 --------------------------------------------------------------------------
. 2019-04-24 07:00:01.930 Opening tunnel.
. 2019-04-24 07:00:01.930 Autoselected tunnel local port number 50000
. 2019-04-24 07:00:01.930 Autoselected tunnel local port number 50000
. 2019-04-24 07:00:01.930 [Tunnel] Looking up host "TunnelUser.myco.com" for SSH connection
. 2019-04-24 07:00:01.930 [Tunnel] Looking up host "TunnelUser.myco.com" for SSH connection
. 2019-04-24 07:00:01.946 [Tunnel] Connecting to 158.48.6.7 port 50022
. 2019-04-24 07:00:01.946 [Tunnel] Connecting to 158.48.6.7 port 50022
. 2019-04-24 07:00:01.946 [Tunnel] We claim version: SSH-2.0-WinSCP_release_5.9.2
. 2019-04-24 07:00:01.946 [Tunnel] We claim version: SSH-2.0-WinSCP_release_5.9.2
. 2019-04-24 07:00:01.961 [Tunnel] Server version: SSH-2.0-OpenSSH_7.4
. 2019-04-24 07:00:01.961 [Tunnel] We believe remote version has SSH-2 channel request bug
. 2019-04-24 07:00:01.961 [Tunnel] Using SSH protocol version 2
. 2019-04-24 07:00:01.961 [Tunnel] Server version: SSH-2.0-OpenSSH_7.4
. 2019-04-24 07:00:01.961 [Tunnel] Have a known host key of type ssh-ed25519
. 2019-04-24 07:00:01.961 [Tunnel] We believe remote version has SSH-2 channel request bug
. 2019-04-24 07:00:01.961 [Tunnel] Using SSH protocol version 2
. 2019-04-24 07:00:01.961 [Tunnel] Have a known host key of type ssh-ed25519
. 2019-04-24 07:00:01.961 [Tunnel] Doing ECDH key exchange with curve Curve25519 and hash SHA-256
. 2019-04-24 07:00:01.961 [Tunnel] Doing ECDH key exchange with curve Curve25519 and hash SHA-256
. 2019-04-24 07:00:02.383 [Tunnel] Server also has ecdsa-sha2-nistp521 host key, but we don't know it
. 2019-04-24 07:00:02.383 [Tunnel] Host key fingerprint is:
. 2019-04-24 07:00:02.383 [Tunnel] ssh-ed25519 256 c8:9f:ca:46:c7:4c:d9:99:70:5d:58:9e:93:a7:a2:6e
. 2019-04-24 07:00:02.383 [Tunnel] Verifying host key ssh-ed25519 0x637f7fee0c700318 c19949a26200448c eda3adf5b44587f7 4835723006fc0ce0 ,0x5166e673ed987f52 ea810c41949f675f 9ba156f48c5baf17 a9957bfdbfbc6a8c with fingerprint ssh-ed25519 256 c8:9f:ca:46:c7:4c:d9:99:70:5d:58:9e:93:a7:a2:6e
. 2019-04-24 07:00:02.383 [Tunnel] Host key matches configured key
. 2019-04-24 07:00:02.383 [Tunnel] Initialised AES-256 SDCTR client->server encryption
. 2019-04-24 07:00:02.383 [Tunnel] Initialised HMAC-SHA-256 client->server MAC algorithm
. 2019-04-24 07:00:02.383 [Tunnel] Initialised AES-256 SDCTR server->client encryption
. 2019-04-24 07:00:02.383 [Tunnel] Initialised HMAC-SHA-256 server->client MAC algorithm
. 2019-04-24 07:00:02.383 [Tunnel] Server also has ecdsa-sha2-nistp521 host key, but we don't know it
. 2019-04-24 07:00:02.383 [Tunnel] Host key fingerprint is:
. 2019-04-24 07:00:02.383 [Tunnel] ssh-ed25519 256 c8:9f:ca:46:c7:4c:d9:99:70:5d:58:9e:93:a7:a2:6e
. 2019-04-24 07:00:02.383 [Tunnel] Verifying host key ssh-ed25519 0x637f7fee0c700318 c19949a26200448c eda3adf5b44587f7 4835723006fc0ce0 ,0x5166e673ed987f52 ea810c41949f675f 9ba156f48c5baf17 a9957bfdbfbc6a8c with fingerprint ssh-ed25519 256 c8:9f:ca:46:c7:4c:d9:99:70:5d:58:9e:93:a7:a2:6e
. 2019-04-24 07:00:02.399 [Tunnel] Host key matches configured key
. 2019-04-24 07:00:02.399 [Tunnel] Initialised AES-256 SDCTR client->server encryption
. 2019-04-24 07:00:02.399 [Tunnel] Initialised HMAC-SHA-256 client->server MAC algorithm
. 2019-04-24 07:00:02.399 [Tunnel] Initialised AES-256 SDCTR server->client encryption
. 2019-04-24 07:00:02.399 [Tunnel] Initialised HMAC-SHA-256 server->client MAC algorithm
. 2019-04-24 07:00:02.430 [Tunnel] Reading key file "E:\SSHRelay\TheKey.ppk"
! 2019-04-24 07:00:02.430 [Tunnel] Using username "TunnelUser".
. 2019-04-24 07:00:02.430 [Tunnel] Server offered these authentication methods: publickey,gssapi-keyex,gssapi-with-mic
. 2019-04-24 07:00:02.430 [Tunnel] Offered public key
. 2019-04-24 07:00:02.430 [Tunnel] Offer of public key accepted
! 2019-04-24 07:00:02.430 [Tunnel] Authenticating with public key "TheKey"
. 2019-04-24 07:00:02.430 [Tunnel] Reading key file "E:\SSHRelay\TheKey.ppk"
! 2019-04-24 07:00:02.430 [Tunnel] Using username "TunnelUser".
. 2019-04-24 07:00:02.430 [Tunnel] Server offered these authentication methods: publickey,gssapi-keyex,gssapi-with-mic
. 2019-04-24 07:00:02.446 [Tunnel] Offered public key
. 2019-04-24 07:00:02.446 [Tunnel] Offer of public key accepted
! 2019-04-24 07:00:02.446 [Tunnel] Authenticating with public key "TheKey"
. 2019-04-24 07:00:02.821 [Tunnel] Sent public key signature
. 2019-04-24 07:00:02.821 [Tunnel] Sent public key signature
. 2019-04-24 07:00:02.836 [Tunnel] Access granted
. 2019-04-24 07:00:02.836 [Tunnel] Local port 50000 forwarding to ftp.Session1.com:22
. 2019-04-24 07:00:02.836 --------------------------------------------------------------------------
. 2019-04-24 07:00:02.836 Connecting via tunnel interface 127.0.0.1:50000.
. 2019-04-24 07:00:02.836 Looking up host "127.0.0.1" for SSH connection
. 2019-04-24 07:00:02.836 Connecting to 127.0.0.1 port 50000
. 2019-04-24 07:00:02.836 We claim version: SSH-2.0-WinSCP_release_5.9.2
. 2019-04-24 07:00:02.836 [Tunnel] Access granted
. 2019-04-24 07:00:02.836 [Tunnel] Local port 50000 forwarding to sftp.Session2.com:22
. 2019-04-24 07:00:02.836 --------------------------------------------------------------------------
. 2019-04-24 07:00:02.836 Connecting via tunnel interface 127.0.0.1:50000.
. 2019-04-24 07:00:02.836 Looking up host "127.0.0.1" for SSH connection
. 2019-04-24 07:00:02.836 Connecting to 127.0.0.1 port 50000
. 2019-04-24 07:00:02.836 We claim version: SSH-2.0-WinSCP_release_5.9.2
. 2019-04-24 07:00:02.899 Server version: SSH-2.0-7.42 FlowSsh: Bitvise SSH Server (WinSSHD) 7.42
. 2019-04-24 07:00:02.899 We believe remote version has SSH-2 channel request bug
. 2019-04-24 07:00:02.899 Using SSH protocol version 2
. 2019-04-24 07:00:02.930 Server version: SSH-2.0-7.42 FlowSsh: Bitvise SSH Server (WinSSHD) 7.42
. 2019-04-24 07:00:02.946 We believe remote version has SSH-2 channel request bug
. 2019-04-24 07:00:02.946 Using SSH protocol version 2
. 2019-04-24 07:00:02.946 Doing ECDH key exchange with curve Curve25519 and hash SHA-256
. 2019-04-24 07:00:02.946 Doing ECDH key exchange with curve Curve25519 and hash SHA-256
. 2019-04-24 07:00:03.477 Server also has ssh-rsa host key, but we don't know it
. 2019-04-24 07:00:03.477 Host key fingerprint is:
. 2019-04-24 07:00:03.477 ssh-ed25519 256 59:d7:b3:6b:6b:e9:e9:ca:5c:f7:30:20:4b:58:96:fb
. 2019-04-24 07:00:03.477 Verifying host key ssh-ed25519 0x3686d9c9327f1db2 3f8afcadeb6e349b bb9565e44e16a7f3 1319e9b9a454a7b0 ,0x33c8dc2cf72ba75e b036d23a2f515dca 603d6e9488b8f49d fe5f507d5f12113e with fingerprint ssh-ed25519 256 59:d7:b3:6b:6b:e9:e9:ca:5c:f7:30:20:4b:58:96:fb
* 2019-04-24 07:00:03.477 WARNING! Giving up security and accepting any host key as configured!
. 2019-04-24 07:00:03.493 Initialised AES-256 SDCTR client->server encryption
. 2019-04-24 07:00:03.493 Initialised HMAC-SHA-256 client->server MAC algorithm
. 2019-04-24 07:00:03.493 Initialised AES-256 SDCTR server->client encryption
. 2019-04-24 07:00:03.493 Initialised HMAC-SHA-256 server->client MAC algorithm
. 2019-04-24 07:00:03.555 Server also has ssh-rsa host key, but we don't know it
. 2019-04-24 07:00:03.555 Host key fingerprint is:
. 2019-04-24 07:00:03.555 ssh-ed25519 256 59:d7:b3:6b:6b:e9:e9:ca:5c:f7:30:20:4b:58:96:fb
. 2019-04-24 07:00:03.555 Verifying host key ssh-ed25519 0x3686d9c9327f1db2 3f8afcadeb6e349b bb9565e44e16a7f3 1319e9b9a454a7b0 ,0x33c8dc2cf72ba75e b036d23a2f515dca 603d6e9488b8f49d fe5f507d5f12113e with fingerprint ssh-ed25519 256 59:d7:b3:6b:6b:e9:e9:ca:5c:f7:30:20:4b:58:96:fb
* 2019-04-24 07:00:03.555 WARNING! Giving up security and accepting any host key as configured!
. 2019-04-24 07:00:03.555 Initialised AES-256 SDCTR client->server encryption
. 2019-04-24 07:00:03.555 Initialised HMAC-SHA-256 client->server MAC algorithm
. 2019-04-24 07:00:03.555 Initialised AES-256 SDCTR server->client encryption
. 2019-04-24 07:00:03.555 Initialised HMAC-SHA-256 server->client MAC algorithm
! 2019-04-24 07:00:03.555 Using username "krogeraxium".
! 2019-04-24 07:00:03.586 Using username "kroger.prod".
. 2019-04-24 07:00:03.618 Server offered these authentication methods: publickey,gssapi-with-mic,password
. 2019-04-24 07:00:03.633 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2019-04-24 07:00:03.633 Using stored password.
. 2019-04-24 07:00:03.633 Sent password
. 2019-04-24 07:00:03.665 Server offered these authentication methods: publickey,gssapi-with-mic,password
. 2019-04-24 07:00:03.665 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2019-04-24 07:00:03.665 Using stored password.
. 2019-04-24 07:00:03.665 Sent password
. 2019-04-24 07:00:05.430 [Tunnel] Closing connection.
. 2019-04-24 07:00:05.430 [Tunnel] Sending special code: 12
. 2019-04-24 07:00:05.430 [Tunnel] Sending special code: 12
. 2019-04-24 07:00:05.430 [Tunnel] Sent EOF message
. 2019-04-24 07:00:05.430 [Tunnel] Sent EOF message
. 2019-04-24 07:00:05.430 Server unexpectedly closed network connection
. 2019-04-24 07:00:05.430 Server unexpectedly closed network connection

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,285
Location:
Prague, Czechia

Re: Tunnel port automatically set to 50000 - even multiple connections

I'm bit confused with the log. Are both sessions logging to the same log file? Can you separate those logs?

Reply with quote

Advertisement

You can post new topics in this forum