qrexec to mimic ssh listen?

73 views
Skip to first unread message

0xB44EFD8751077F97

unread,
Sep 19, 2017, 11:01:01 PM9/19/17
to qubes-users
Using Qubes3.2, I'm attempting to create a communication
channel between two VMs. One VM without networking. I'd like to mimic
ssh -L port:localhost:port.

I think a qrexec rpc should work, but I'm not sure what to include in
the rpc-action file. Any help is appreciated.

Thanks!

Message has been deleted

nicholas roveda

unread,
Sep 20, 2017, 11:27:21 AM9/20/17
to qubes-users
I think you can use a systemd socket associated with a `socat` service that connects the rpc stdin/stdout to a target VM listening port.

You can mimic how the Templates updates packets are redirected to the port 8082 of sys-net using rpc in R4.0.

Since you're using R3.2, if you can't figure out anything, I'll post here an example tomorrow.

Unman

unread,
Sep 20, 2017, 6:29:19 PM9/20/17
to 0xB44EFD8751077F97, qubes-users
Have a look at this using socat:
https://github.com/QubesOS/qubes-issues/issues/2148

Although it's still marked as open, it works well and is used in Qubes
4.0.

socat TCP-LISTEN:444,fork EXEC:"qrexec-client-vm target-vm my-tcp-service"
does just what you want.

If you had my-tcp-service on target-vm:
socat STDIO TCP:localhost:22

You could 'ssh localhost:4444' and ssh in to target, even when target is not networked.
A little simple scripting and you can have this as a general listener to
connect to different services on targets.

unman

0xB44EFD8751077F97

unread,
Sep 21, 2017, 7:33:31 PM9/21/17
to qubes-users
Unman:
Awesome, this really helped me. Thank you so much!
Reply all
Reply to author
Forward
0 new messages