Skip to Content

PairSpaces

DocsBlog

PairSpaces

Connecting to Spaces

How you join your Space

You can connect to your Space. Your team can connect to your Space. And your Space can be accessed from a browser. These ways of connecting to Spaces use the same secure technology that you already use to access machines anywhere.

Connecting to Spaces

You can connect to your Spaces using the terminal, IDE, DevContainers, and browsers. Let's describe how PairSpaces secures your Spaces when you access them.

Terminal

PairSpaces uses the Secure Shell (SSH) technology that you already use to access machines. When you use the PairSpaces CLI to access your Space with pair space SPACE_ID, PairSpaces uses your Keys to create a SSH session and permits the same features that you expect from SSH - secure remote access, agent forwarding, secure copy, secure FTP, port forwarding, etc.

The PairSpaces CLI creates a new configuration entry in your SSH configuration file, so that you can write scripts with the shortcut ssh SPACE_ID.

IDE

PairSpaces works with any IDE that can create SSH sessions using the SSH configuration file on your computer. For example, VSCode's Remote SSH extension works with your Space defined in your SSH configuration file.

Note Your SSH configuration file is updated to include your Space when you run pair space SPACE_ID.

When prompted select the SSH configuration entry labeled by your SPACE_ID.

DevContainer

PairSpaces works with DevContainers, so you can work from a Space that is configured as a DevContainer. The approach is the same as using DevContainers with any other remote machine: First, create a Docker context for your Space using the following command:


> docker context create CONTEXT_NAME --docker "host=ssh://SPACE_ID"

Successfully created context "CONTEXT_NAME"

where SPACE_ID is the name of configuration entry in your SSH configuration file created by PairSpaces (run pair space SPACE_ID once to create the configuration entry).

To activate the Docker context use the following command:


> docker context use CONTEXT_NAME

Current context is now "CONTEXT_NAME"

Using VSCode (or any IDE that supports DevContainers), open a directory that includes a DevContainer configuration file, i.e., devcontainer.json.

Note Your devcontainer.json file must be configured to work with PairSpaces. The values for workspaceFolder and workspaceMount should be as follows:

{
  "workspaceFolder": "/usr/src/app",
  "workspaceMount": "source=/space,target=/usr/src/app,type=bind,consistency=delegated"
}

Web

When you choose to create a Space that is accessible from the Web as well as from the terminal and IDE, you can access your Space from a browser. Navigate to https://pairspaces.com/pairs/SPACE_ID and you will be be redirected to a private IDE in your browser.

Previous

Providers

Next

Sharing Spaces