I have a device on a remote host which connects via IP address (see image below). For this example, my remote host is named myremote, and the device is visible on myremote as 192.168.3.15, port 55555.
I would like to connect to this device on my local machine (localhost) such that I can access the device directly in the same way. I've tried connecting with ssh
to map the port, but I cannot reach the device.
How can I setup the ssh tunnel such that I request connection to the device (192.168.3.15:55555) and can access it on my local machine? I've tried using ssh tunnel
but haven't had much success:
# executed from command line on localhost
ssh -vvv -N -T -L :55555:192.168.3.15:55555 username@myremote
I need to connect from localhost to the device at 192.168.3.15:55555, which is visible only on the remote host. I can connect fine with ssh, and can make other tunnel operations work (jupyter notebook remote server, for instance). However, I cannot so far reach the device itself. Note: the device is connected locally to the remote using an ethernet cable, and cannot be seen on the remotehost's LAN.