SSH Access
You can connect to any of your sandboxes via SSH using token-based authentication.
Creating an SSH Access Token
To connect to a sandbox, you’ll need to create an SSH access token first. This token provides secure, time-limited access to your sandbox.
SSH access can be initialized from the dashboard by opening the sandbox’s options menu and selecting Create SSH Access.
It can also be initialized programmatically using one of the SDKs listed below.
from daytona import Daytona
daytona = Daytona()sandbox = daytona.get("sandbox-abc123")
# Create SSH access tokenssh_access = sandbox.create_ssh_access(expires_in_minutes=60)print(f"SSH Token: {ssh_access.token}")import { Daytona } from '@daytonaio/sdk'
const daytona = new Daytona()const sandbox = await daytona.get('sandbox-abc123')
// Create SSH access tokenconst sshAccess = await sandbox.createSshAccess(60)console.log(`SSH Token: ${sshAccess.token}`)Connection Command
Once you have your token, connect using:
ssh <token>@ssh.app.daytona.ioConnecting with VSCode
Connecting your local VSCode to a sandbox requires a few simple steps:
- Make sure that the Remote Explorer extension is installed in your VSCode.
- Add a new SSH connection
- When prompted for the SSH connection URL, paste your SSH command from above.
Find out more about the extension here.
Connecting with JetBrains IDEs
Connecting your local JetBrains IDEs to a sandbox requires a few simple steps:
- Download the JetBrains Gateway app to your local machine.
- Add a new connection.
- When prompted for the SSH connection URL, paste your SSH command from above.
- Choose an IDE you want installed in your sandbox.
Managing SSH Access
Token Expiration
SSH access tokens expire automatically for security:
- Default: 60 minutes
Revoking Access
You can revoke SSH access tokens at any time:
# Revoke all SSH access for the sandboxsandbox.revoke_ssh_access()
# Revoke specific SSH access for the sandboxsandbox.revoke_ssh_access(token="specific-token")// Revoke all SSH access for the sandboxawait sandbox.revokeSshAccess()
// Revoke specific SSH access for the sandboxawait sandbox.revokeSshAccess('specific-token')