aws-samples / aws-iot-securetunneling-localproxy

AWS Iot Secure Tunneling local proxy reference C++ implementation
https://docs.aws.amazon.com/iot/latest/developerguide/what-is-secure-tunneling.html
Apache License 2.0
73 stars 69 forks source link

ssh tunnels #138

Closed vt-sharper closed 1 year ago

vt-sharper commented 1 year ago

I would like to implement a VNC solution for a my company's devices and wondered if it was possible via IoT?

To test, I've tried chaining SSH tunnels together since the IoT local proxy is running in a container as is the AWS IoT Device Client. To test, in the proxy container I run ssh -4 otg@localhost -NL 5900:localhost:5900 and I have netcat listening on 5900 in the device client container. I then curl localhost:5900 from the proxy and am met with:

channel 1019: open failed: connect failed: Too many open files

If I increase the verbosity I can see ssh is in a loop of opening file descriptors. My guess is it's not possible?

vt-sharper commented 1 year ago

It looks like AWS IoT allows multiple protocols. I think I can use VNC instead of SSH as a service when I open a tunnel...

vt-sharper commented 1 year ago

Got it to work with the VNC protocol.