Access Dev Environment via SSH
Sometimes, you might need to access your dev environment directly via SSH. For example, for some management tasks, for running existing deployment scripts, for debugging purposes, and so on.
Prerequisites
(Windows) You've enabled the SSH agent service. Learn how to do this
You have SSH keys set up: the public key is added to your CodeCanvas account, and the private key is added to the SSH agent on your local machine. Learn how to perform such setup
The dev environment template used to create the dev environment must have the SSH access enabled. Learn more
Depending on whether you prefer to use JetBrains Gateway or the CodeCanvas UI:
JetBrains GatewayCodeCanvasIn Gateway, find the dev environment you want to access.
In the dev environment menu, click SSH connection.
In CodeCanvas, click the CodeCanvas logo in the upper-left corner. On the page, find the dev environment you want to access.
In the dev environment menu, click SSH connection.
In the dialog, copy the connection snippet. It should look like this:
ssh -J ef5ccc0162b644b38user@mycodecanvas.example.com:63101 -o ForwardAgent=yes -o HostKeyAlias=cunning-puffin -p 63645 root@127.0.0.1
Run the copied command on your local machine.
tip
Alternatively, you can follow the instructions in the same dialog to add the remote host to your SSH configuration. This will be a persistent configuration that you can use to connect to the dev environment in the future with:
ssh cunning-puffin
Here
cunning-puffin
is an alias for the host.
Thanks for your feedback!