Accessing workspaces with SSH
SSH Help
Section titled “SSH Help”All workspaces in Workspace Manager are accessible via SSH, allowing you to use your favorite IDE and tools.
Configuration
Section titled “Configuration”Workspaces are accessible via SSH using key-based authentication. You configure SSH public keys on your profile. All SSH keys on your profile can be used to access any workspace you have access to. Instructions for connecting over SSH are available on each workspace’s status page.
The SSH command is in the format
ssh <workspace_id>@<ssh_endpoint>You can also manually configure SSH client configuration for your workspaces:
Host wsm.* HostName <ssh_endpoint> ForwardAgent yes IdentitiesOnly yes
Host wsm.my_workspace User <workspace_id>
Host wsm.my_other_workspace User <workspace_id>You can get a workspace’s ID from the URL when viewing the workspace status page, which is in this format:
/project/<project_id>/workspaces/<workspace_id>/statusAutomatic Configuration Update
Section titled “Automatic Configuration Update”This configuration can be automatically downloaded, placed under ~/.ssh/config.d, and included in your primary ~/.ssh/config file using the following WSM CLI command:
wsm-cli ssh config-updateThis command will:
- Download your personalized SSH configuration
- Save it to
~/.ssh/config.d/wsm-config - Update your
~/.ssh/configto include the WSM configuration
See the CLI documentation for more information on the CLI.
SSH Keys
Section titled “SSH Keys”The SSH keys for all developers on a given project are automatically installed in all workspaces belonging to that project.
Setting Your SSH Key
Section titled “Setting Your SSH Key”- Navigate to your profile page in the WSM admin
- Go to the “Details” section
- Add or update your SSH public key
- Save changes
Your key will be automatically deployed to all workspaces in projects you have access to.
Getting Added to a Project
Section titled “Getting Added to a Project”To be added to a project, contact one of that project’s administrators. Once added, your SSH key will be automatically installed in all workspaces for that project.
SSH Autocomplete
Section titled “SSH Autocomplete”The WSM CLI provides an SSH autocomplete implementation that is platform-agnostic and include-aware.
Setup Autocomplete
Section titled “Setup Autocomplete”To initialize autocomplete, run the following command and follow the OS/Shell-specific instructions:
wsm-cli ssh autocomplete setupThis will provide instructions for:
- Bash: Add to
~/.bashrcor~/.bash_profile - Zsh: Add to
~/.zshrc - Fish: Add to
~/.config/fish/config.fish
Connecting to Workspaces
Section titled “Connecting to Workspaces”Once your SSH configuration is set up, connecting to a workspace is simple:
# Connect to a workspacessh workspace-name
# Or use the full hostnamessh workspace-name.project-name.wsm.example.comThe SSH configuration handles the port mapping automatically.
Using with IDEs
Section titled “Using with IDEs”VS Code
Section titled “VS Code”- Install the “Remote - SSH” extension
- Open the Command Palette (Cmd/Ctrl+Shift+P)
- Select “Remote-SSH: Connect to Host”
- Choose your workspace from the list
- VS Code will connect and you can work remotely
PHPStorm / IntelliJ
Section titled “PHPStorm / IntelliJ”- Go to Tools → Deployment → Configuration
- Click + to add a new SFTP server
- Enter your workspace hostname
- Set authentication to “Key pair”
- Map your local and remote paths
- Click OK and test the connection
Other IDEs
Section titled “Other IDEs”Any IDE that supports SSH/SFTP can connect to workspaces. Use the hostname from your SSH config and your SSH key for authentication.
Troubleshooting
Section titled “Troubleshooting”Connection Refused
Section titled “Connection Refused”If you get a “Connection refused” error:
- Verify the workspace is running (check WSM admin dashboard)
- Ensure your SSH config is up to date:
wsm-cli ssh config-update - Check that your SSH key is properly configured in your profile
Permission Denied
Section titled “Permission Denied”If you get a “Permission denied” error:
- Verify your SSH key is added to your WSM profile
- Check that you have access to the project
- Ensure your SSH key has the correct permissions:
chmod 600 ~/.ssh/id_rsa
Host Key Verification Failed
Section titled “Host Key Verification Failed”If you get a host key verification error:
- Remove the old host key:
ssh-keygen -R workspace-name - Try connecting again and accept the new host key
Security Best Practices
Section titled “Security Best Practices”- Use SSH keys only - Password authentication is disabled
- Protect your private key - Never share your private SSH key
- Use a passphrase - Protect your SSH key with a strong passphrase
- Rotate keys regularly - Update your SSH keys periodically
- One key per device - Use different SSH keys for different machines
Next Steps
Section titled “Next Steps”- CLI Reference - Learn about CLI commands
- Getting Started - General setup guide
- Contact Support - Get help with SSH configuration