Convox Community

SSH Tunnel

Hi there, As you know we don’t have access to the key-pair to connect to our instances. So the solution is using convox CLI “convox instances ssh INSTANCE_ID”. I’m wondering to know if it possible to create an SSH tunnel with local forwarding to one of the instances?


I don’t think there is local port forwarding, but in case this is helpful for anyone:

Obviously you can get a shell in your application with

cx run process /bin/bash
or cx exec abcdefgh1234 /bin/bash

If you need to copy a file to your process, pipes work over run and exec so you can do:

cat myfile.txt | cx run process 'cat > /my_volume/myfile.txt'
or cat myfile.txt | cx exec abcdefgh1234 'cat > myfile.txt'
to get a file onto a process. It’s a bit clunky but it will do in a pinch.

You can also proxy resource ports locally with cx resources proxy.

And you can always spin up a new EC2 instance in the rack’s VPC if you just need a workspace behind the firewall.

This doesn’t cover all use-cases, but between these 4 things, we haven’t needed SSH access yet.

1 Like