0

I have a project where I have a Serial port on one computer and not on the other. I need to provide a virtual serial port that is connected to TCP on the computer without a physical serial port.

I have successfully done this using socat but this requires a known IP address on the client computer open to the network, however I wish to be able to access it from a client computer in another network over the internet.

I also have completed reverse ssh connection allowing my server to connect to the client without knowing it's IP address.

I wish to know is there a way to do this using socat and reverse ssh. Or another program to share a serial port with a device without a static/public IP?

Thank you, For any Help in Advance

New contributor
perilton is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Can you explain a little more what you mean by "completed reverse ssh connection"? If you mean by this that the server is connecting to the client, but leaving a local port open on the client that connects back to port 22 on the server, then adding another such local port on the client connecting to say port 12000 on the server and then have socat listen on port 12000 and communicate to the serial device should do it. – icarus Aug 15 at 0:46
  • @icarus What I mean is that the client is able to connect to the server with a public IP address of the server. When doing so with "SSH -R" I am able to create a port on the server to communicate back to the client computer on its default ssh port, even though it is behind a firewall and does not have a public IP by the server using ssh to this extra port. Thank you for your information, I will try to see how I can implement it. – perilton Aug 15 at 13:53
  • Thanks. So the server has a public ip address, and the client does not (as it is behind a firewall). Is the serial device connected to the client or the server? If it is connected to the client, can you clarify if there is a second client (client2) that needs to access the serial device on the first client? The -R or maybe a -L certainly seems the way forward. – icarus Aug 16 at 0:51

Your Answer

perilton is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.