On Sun, Oct 10, 2021 at 03:24 PM, J¨¹rgen Reinold wrote:
When you use SSH, port 22 is used internally by SSH to establish the connection, for authentication and various control functions, as well as for the physical flow of packets between the systems. So do not change port 22.
IBKR has selected four default ports for the TWS API connections:
- IB/Gateway uses port 4002 for Paper Trading accounts and port 4001 for live accounts
- TWS/Trader Workstation uses port 7497 for Paper Trading and port 7496 for live accounts
- ?
Could you elaborate here, in the reverse SSH tunnel, the final traffic would be directed to port 22 of the machine that initiates ssh -R
In command form that would be:?
ssh -R 50000:localhost:22 [account-login]@[server-ip]
However, since TWS listens on port 7497 and 7496, we would need to modify that command to:
ssh -R 50000:localhost:7496 [server-login]@[server-ip]
Wouldn't this mean that we're not using port 22 anymore?
Also now that I'm thinking about it if we need to initiate this connection from the local system, that might complicate the automatic log in/out part quite a bit
I wonder if just a headless TWS server and then connecting to the GUI through VNC is actually good enough