Set up SSH, connect from your terminal, and reconnect to a BoxLite Cloud box without repeating setup.
Connect to a Cloud box from your local terminal using OpenSSH. Set up access once, then reuse the generated connection command.You can configure SSH through the CLI or through the Dashboard when its SSH tab is available. Both paths require a local BoxLite CLI signed in to Cloud.
Paste the key at the prompt. The CLI saves your credentials and organization routing information locally.app names your saved CLI context. The API address is https://api.boxlite.ai; https://app.boxlite.ai is the web console.Copy the box ID from Boxes in the console. Replace <YOUR_BOX_ID> below, keeping the quotes:
Choose one setup method. If this box already has SSH configured and you have its private key and connection command, skip to Reconnect.
CLI
Dashboard
boxlite --context app ssh "$BOX"
The CLI generates and saves keys on your computer, configures guest SSH, and prints:
Your private-key path.
The box’s SSH host-key fingerprint.
A complete ssh connection command.
Copy the entire command after Copy and run the following command to enter the box. Run it in your local terminal to connect.
If your box details page has no SSH tab, use the CLI instructions instead.The generated command uses the local BoxLite CLI for its connection. Select the context you logged into above:
boxlite context use app
This makes app the default for subsequent CLI commands.
Open your running box in the console and select SSH.
Click Setup, then Set up SSH.
Click Download private key and save the file before leaving the page.
In your local terminal, change to the directory containing the downloaded key.
Run the commands shown in the dialog, including any key-permission command, followed by the complete ssh command.
Keep the downloaded key and connection command for future connections.
Setup configures SSH; it does not open a shell. Running setup again replaces the SSH configuration and disconnects existing clients. Reconnecting does not require setup.
On the first connection, OpenSSH asks whether to trust the host. Compare its fingerprint with the fingerprint shown during setup. If they match, type yes.Once connected, run:
whoamiuname -s
On the BoxLite agent base image, these print boxlite and Linux. You are now running commands inside the box.Save the generated connection command. Keep its quoting, key path, and ProxyCommand intact; a command copied from someone else’s computer may reference their local files.
Run your saved ssh command again. Keep the matching private key on your computer and your CLI signed in to the same Cloud account.If the box is stopped, start it first:
boxlite --context app start "$BOX"
If SSH was disabled, enable the saved configuration on the running box:
boxlite --context app ssh --enable "$BOX"
Then run your saved ssh command. You can also click Enable in the Dashboard’s SSH tab when available.
The box keeps running. The public tunnel opened by the SSH proxy also remains open; SSH authentication still requires your private key.To close access, run both commands in your local terminal while the box is running:
Disabling SSH disconnects existing SSH clients. To return later, follow Reconnect; the proxy opens the tunnel again when you connect.To stop the box itself, see Box lifecycle.
Install the latest CLI using the command above, then open a new terminal and try again.
Authentication fails, or the box cannot be found
Confirm the box ID and log in to the same Cloud account as the console, using the app context.
SSH is disabled
Start the box, run boxlite --context app ssh --enable "$BOX", then reuse your connection command.
OpenSSH rejects private-key permissions
On macOS or Linux, run chmod 600 /path/to/your/private-key, substituting the actual key path.
Permission denied (publickey)
Use the private key matching the box’s current SSH setup. Another setup may have replaced the authorized key.
The host fingerprint changed
Compare it with boxlite --context app ssh --status "$BOX" before updating your SSH known-host entry.
The printed 0.0.0.0:22 is the guest’s listening address. Connect using the generated command, which routes through Cloud; you do not need a public box IP.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"BoxLite Documentation","colors":{"primary":"#00B0F0","light":"#38C7FF","dark":"#0090C8"},"logo":{"light":"https://mintcdn.com/boxliteai/PJGMTNlEZYO0BQu3/logo/light.png?fit=max\u0026auto=format\u0026n=PJGMTNlEZYO0BQu3\u0026q=85\u0026s=ca289df85e44943aceb95cbf5e4725ea","dark":"https://mintcdn.com/boxliteai/PJGMTNlEZYO0BQu3/logo/dark.png?fit=max\u0026auto=format\u0026n=PJGMTNlEZYO0BQu3\u0026q=85\u0026s=10c7a7b82c7f6d772d5f0659c3d93bef","href":"/"},"favicon":"https://mintcdn.com/boxliteai/Jyu4ea7vpdHuIh5x/favicon.svg?fit=max\u0026auto=format\u0026n=Jyu4ea7vpdHuIh5x\u0026q=85\u0026s=c249a888107f6355801fa37f42487b5a","appearance":{"default":"dark"},"background":{"color":{"light":"#FFFFFF","dark":"#13161B"}},"navbar":{"links":[{"icon":"discord","href":"https://go.boxlite.ai/discord","label":"Discord"}],"primary":{"type":"github","href":"https://github.com/boxlite-ai/boxlite"}},"footer":{"socials":{"github":"https://github.com/boxlite-ai","discord":"https://go.boxlite.ai/discord"}},"fonts":{"heading":{"family":"IBM Plex Mono"},"body":{"family":"Inter"}},"styling":{"codeblocks":{"theme":{"light":"github-light","dark":"github-dark"}},"latex":true},"contextual":{"options":["copy","view"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"boxliteai","hasAudioNarration":false,"actualSubdomain":"boxliteai","customDomains":["docs.boxlite.ai"],"gitSource":{"type":"github","owner":"boxlite-ai","repo":"documentation","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aebf1688b849a765e45fc36","collectionId":"8e186c87-29fc-4631-899a-caa1905ed025","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aebf1688b849a765e45fc36"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{},"buildId":"6aebf1688b849a765e45fc36","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"BoxLite Open Source","count":51},{"language":"default","tag":"BoxLite Cloud","count":29},{"language":"default","tag":"Use cases","count":20},{"language":"default","tag":"Agent tools","count":8},{"language":"default","tag":"Manage sandboxes","count":8},{"language":"default","tag":"Contributing","count":7},{"language":"default","tag":"Getting started","count":6},{"language":"default","tag":"SDK reference","count":6},{"language":"default","tag":"Agent in a box","count":5},{"language":"default","tag":"Architecture","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"custom.css","content":":root{--bl-brand: #00b0f0;--bl-brand-bright: #38c7ff;--bl-dark-bg: #13161b;--bl-dark-card: #1a1d24;--bl-dark-code: #0d0f13;--bl-dark-border: #2a2f3a;--bl-dark-dim: #8c919c;--bl-light-card: #f3f4f6;--bl-light-code: #f7f9fc;--bl-light-border: #e2e5ea;--bl-light-dim: #6b7079;--bl-mono: \"IBM Plex Mono\", ui-monospace, \"SFMono-Regular\", \"SF Mono\", monospace;--bl-ring: 196 100% 47%;--bl-accent-light: 220 14% 93%;--bl-accent-dark: 222 14% 16%;--bl-success-light: 137 45% 38%;--bl-warning-light: 38 80% 40%;--bl-danger-light: 5 71% 50%;--bl-info-light: 196 100% 47%;--bl-success-dark: 137 60% 60%;--bl-warning-dark: 43 72% 57%;--bl-danger-dark: 5 71% 58%;--bl-info-dark: 196 100% 47%;--bl-shadow-card-light: 0 1px 2px #1018280a, 0 8px 24px -10px #1018281a;--bl-shadow-card-hover-light: 0 2px 4px #1018280f, 0 14px 32px -12px #10182824;--bl-shadow-card-dark: 0 1px 2px #0006, 0 10px 28px -8px #0000008c;--bl-shadow-card-hover-dark: 0 2px 4px #00000080, 0 16px 36px -10px #000000a6}*,*::before,*::after{border-radius:0!important}[class*=\"rounded-full\"],img[class*=\"rounded-full\"],[class*=\"avatar\"],[role=\"switch\"],[role=\"switch\"] *{border-radius:9999px!important}code,pre,kbd,samp,tt{font-family:var(--bl-mono)!important}::selection{background:var(--bl-brand);color:#ffffff}*{scrollbar-width:thin}*::-webkit-scrollbar{width:9px;height:9px}*::-webkit-scrollbar-thumb{background:var(--bl-dark-border)}*::-webkit-scrollbar-thumb:hover{background:var(--bl-brand)}*::-webkit-scrollbar-track{background:transparent}.card{background-color:var(--bl-light-card)!important;border:1px solid var(--bl-light-border)!important;box-shadow:var(--bl-shadow-card-light)!important;transition:background-color 0.12s ease, box-shadow 0.12s ease!important}.card:hover{background-color:hsl(var(--bl-accent-light))!important;box-shadow:var(--bl-shadow-card-hover-light)!important}.dark .card{background-color:var(--bl-dark-card)!important;border-color:var(--bl-dark-border)!important;box-shadow:var(--bl-shadow-card-dark)!important}.dark .card:hover{background-color:hsl(var(--bl-accent-dark))!important;box-shadow:var(--bl-shadow-card-hover-dark)!important}.code-block{border:1px solid var(--bl-light-border)!important;box-shadow:none!important}.dark .code-block{border-color:var(--bl-dark-border)!important}html.dark .code-block div[class*=\"bg-codeblock\"]{--shiki-dark-bg: var(--bl-dark-code) !important;background-color:var(--bl-dark-code)!important}html:not(.dark) .code-block div[class*=\"bg-codeblock\"]{background-color:var(--bl-light-code)!important}:not(pre)>code{background-color:rgba(0, 176, 240, 0.07)!important;border:1px solid var(--bl-light-border)!important;padding:0.05em 0.34em!important;font-size:0.86em!important}.dark :not(pre)>code{background-color:rgba(0, 176, 240, 0.1)!important;border-color:var(--bl-dark-border)!important}table.table th,table.table td{border:1px solid var(--bl-light-border)!important}.dark table.table th,.dark table.table td{border-color:var(--bl-dark-border)!important}table.table th{font-family:var(--bl-mono)!important;text-transform:uppercase;letter-spacing:0.06em;font-size:0.78em;font-weight:600}.dark table.table thead{background-color:var(--bl-dark-card)}html:not(.dark) table.table thead{background-color:var(--bl-light-card)}.sidebar-title{font-family:var(--bl-mono)!important;text-transform:uppercase!important;letter-spacing:0.12em!important;font-size:10px!important;font-weight:600!important;color:var(--bl-light-dim)!important}.dark .sidebar-title{color:var(--bl-dark-dim)!important}.eyebrow{font-family:var(--bl-mono)!important;text-transform:uppercase!important;letter-spacing:0.5px!important;font-size:10px!important}.steps .step-container [class*=\"rounded-full\"]{background-color:rgba(0, 176, 240, 0.14)!important;border:1px solid var(--bl-brand)!important;color:var(--bl-brand-bright)!important}.callout{border-width:1px 1px 1px 3px!important;box-shadow:none!important}.dark .callout[class*=\"blue\"]{border-color:var(--bl-brand)!important;background-color:rgba(0, 176, 240, 0.1)!important}html:not(.dark) .callout[class*=\"blue\"]{border-color:var(--bl-brand)!important;background-color:rgba(0, 176, 240, 0.07)!important}.accordion-group{border:1px solid var(--bl-light-border)!important}.dark .accordion-group{border-color:var(--bl-dark-border)!important}#navigation-items,#navigation-items a,#table-of-contents-content,.toc,.toc a,nav:has(#table-of-contents-content){font-family:var(--bl-mono)!important}#navigation-items a,.toc a{font-size:13px!important}#navbar a.select-none img,#navbar a[href=\"/\"] img{height:40px!important;max-height:40px!important;width:auto!important;max-width:none!important}.sticky.top-0.pointer-events-none[class*=\"bg-gradient-to-b\"]{background-image:none!important}#navigation-items .sidebar-group,#navigation-items div:has(>.sidebar-group-header){margin-top:4px!important}#navigation-items .sidebar-group:has([aria-expanded=\"true\"]),#navigation-items div:has(>.sidebar-group-header){margin-top:14px!important}#navigation-items div:has(>.sidebar-group-header)>.sidebar-group{margin-top:6px!important}#navigation-items .sidebar-group:first-child,#navigation-items>div>div:first-child{margin-top:0!important}#content-area h1,article h1{font-size:30px!important;line-height:36px!important}#content-area h2,article h2{font-size:21px!important;line-height:30px!important}#content-area h3,article h3{font-size:17px!important;line-height:26px!important}a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[role=\"button\"]:focus-visible,[role=\"tab\"]:focus-visible,[role=\"switch\"]:focus-visible,[tabindex]:not([tabindex=\"-1\"]):focus-visible{outline:1px auto hsl(var(--bl-ring) / 0.5)!important;outline-offset:1px!important}.card:focus-visible,a:focus-visible .card{background-color:hsl(var(--bl-accent-light))!important;outline:1px auto hsl(var(--bl-ring) / 0.5)!important;outline-offset:1px!important}.dark .card:focus-visible,.dark a:focus-visible .card{background-color:hsl(var(--bl-accent-dark))!important}#search-bar-entry:focus-visible,[id*=\"search\"] input:focus-visible{outline:1px auto hsl(var(--bl-ring) / 0.5)!important;outline-offset:1px!important}*:focus-visible{outline-style:auto!important}#content-area blockquote:not(.sr-only),article blockquote:not(.sr-only){border-left:3px solid var(--bl-brand)!important;border-top:0!important;border-right:0!important;border-bottom:0!important;background-color:rgba(0, 176, 240, 0.07)!important;padding:12px 16px!important}.dark #content-area blockquote:not(.sr-only),.dark article blockquote:not(.sr-only){background-color:rgba(0, 176, 240, 0.1)!important}html:not(.dark) .callout[class*=\"amber\"],html:not(.dark) .callout[class*=\"yellow\"]{border-color:hsl(var(--bl-warning-light))!important}html:not(.dark) .callout[class*=\"green\"]{border-color:hsl(var(--bl-success-light))!important}html:not(.dark) .callout[class*=\"red\"]{border-color:hsl(var(--bl-danger-light))!important}.dark .callout[class*=\"amber\"],.dark .callout[class*=\"yellow\"]{border-color:hsl(var(--bl-warning-dark))!important}.dark .callout[class*=\"green\"]{border-color:hsl(var(--bl-success-dark))!important}.dark .callout[class*=\"red\"]{border-color:hsl(var(--bl-danger-dark))!important}"}],"page":{"pagePath":"cloud/ssh","slug":"/cloud/ssh","pageMetadata":{"title":"SSH into a Cloud box","sidebarTitle":"SSH access","description":"Set up SSH, connect from your terminal, and reconnect to a BoxLite Cloud box without repeating setup.","href":"/cloud/ssh"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Set up SSH, connect from your terminal, and reconnect to a BoxLite Cloud box without repeating setup.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Tab,Table,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Connect to a Cloud box from your local terminal using OpenSSH. Set up access once, then reuse the generated connection command.`}),`\n`,_jsxs(_components.p,{children:[`You can configure SSH through the CLI or through the Dashboard when its `,_jsx(_components.strong,{children:`SSH`}),` tab is available. Both paths require a local BoxLite CLI signed in to Cloud.`]}),`\n`,_jsx(Heading,{level:`2`,id:`before-you-start`,children:`Before you start`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Have a `,_jsx(_components.a,{href:`/cloud/boxes`,children:`Cloud box`}),` in your account.`]}),`\n`,_jsx(_components.li,{children:`Install the latest BoxLite CLI using the command below.`}),`\n`,_jsxs(_components.li,{children:[`Have OpenSSH, including `,_jsx(_components.code,{children:`ssh`}),` and `,_jsx(_components.code,{children:`ssh-keygen`}),`, installed on your computer.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Install the latest CLI in your `,_jsx(_components.strong,{children:`local terminal`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -fsSL`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` https://sh.boxlite.ai`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` |`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` sh`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Then check that the CLI and OpenSSH are available:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`boxlite`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` ssh`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --help`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`ssh`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -V`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`log-in-and-prepare-your-box`,children:`Log in and prepare your box`}),`\n`,_jsxs(_components.p,{children:[`In `,_jsx(_components.a,{href:`https://app.boxlite.ai`,children:`the console`}),`, open `,_jsx(_components.strong,{children:`API Keys`}),`, click `,_jsx(_components.strong,{children:`Create Key`}),`, and copy the key. Run:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`boxlite`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --context`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` app`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` auth`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` login`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --url`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` https://api.boxlite.ai`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --method`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` api-key`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Paste the key at the prompt. The CLI saves your credentials and organization routing information locally.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`app`}),` names your saved CLI context. The API address is `,_jsx(_components.code,{children:`https://api.boxlite.ai`}),`; `,_jsx(_components.code,{children:`https://app.boxlite.ai`}),` is the web console.`]}),`\n`,_jsxs(_components.p,{children:[`Copy the box ID from `,_jsx(_components.strong,{children:`Boxes`}),` in the console. Replace `,_jsx(_components.code,{children:`\u003cYOUR_BOX_ID>`}),` below, keeping the quotes:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`BOX`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'\u003cYOUR_BOX_ID>'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`boxlite`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --context`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` app`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` start`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`$BOX`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`boxlite`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --context`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` app`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` network`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` inbound`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`$BOX`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` enabled`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Keep this terminal open for the following commands.`}),`\n`,_jsx(Heading,{level:`2`,id:`set-up-ssh-once`,children:`Set up SSH once`}),`\n`,_jsxs(_components.p,{children:[`Choose `,_jsx(_components.strong,{children:`one`}),` setup method. If this box already has SSH configured and you have its private key and connection command, skip to `,_jsx(_components.a,{href:`#reconnect`,children:`Reconnect`}),`.`]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`CLI`,id:`cli`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`boxlite`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --context`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` app`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` ssh`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`$BOX`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`})]}),`\n`]})})}),_jsx(_components.p,{children:`The CLI generates and saves keys on your computer, configures guest SSH, and prints:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Your private-key path.`}),`\n`,_jsx(_components.li,{children:`The box’s SSH host-key fingerprint.`}),`\n`,_jsxs(_components.li,{children:[`A complete `,_jsx(_components.code,{children:`ssh`}),` connection command.`]}),`\n`]}),_jsxs(_components.p,{children:[`Copy the `,_jsx(_components.strong,{children:`entire command`}),` after `,_jsx(_components.strong,{children:`Copy and run the following command to enter the box`}),`. Run it in your local terminal to connect.`]})]}),_jsxs(Tab,{title:`Dashboard`,id:`dashboard`,children:[_jsxs(_components.p,{children:[`If your box details page has no `,_jsx(_components.strong,{children:`SSH`}),` tab, use the `,_jsx(_components.strong,{children:`CLI`}),` instructions instead.`]}),_jsx(_components.p,{children:`The generated command uses the local BoxLite CLI for its connection. Select the context you logged into above:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`boxlite`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` context`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` use`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` app`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`This makes `,_jsx(_components.code,{children:`app`}),` the default for subsequent CLI commands.`]}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Open your running box in the console and select `,_jsx(_components.strong,{children:`SSH`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Setup`}),`, then `,_jsx(_components.strong,{children:`Set up SSH`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Download private key`}),` and save the file before leaving the page.`]}),`\n`,_jsx(_components.li,{children:`In your local terminal, change to the directory containing the downloaded key.`}),`\n`,_jsxs(_components.li,{children:[`Run the commands shown in the dialog, including any key-permission command, followed by the complete `,_jsx(_components.code,{children:`ssh`}),` command.`]}),`\n`]}),_jsx(_components.p,{children:`Keep the downloaded key and connection command for future connections.`})]})]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Setup configures SSH; it does not open a shell. Running setup again replaces the SSH configuration and disconnects existing clients. Reconnecting does not require setup.`})}),`\n`,_jsx(Heading,{level:`2`,id:`confirm-your-connection`,children:`Confirm your connection`}),`\n`,_jsxs(_components.p,{children:[`On the first connection, OpenSSH asks whether to trust the host. Compare its fingerprint with the fingerprint shown during setup. If they match, type `,_jsx(_components.code,{children:`yes`}),`.`]}),`\n`,_jsx(_components.p,{children:`Once connected, run:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`whoami`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`uname`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -s`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`On the BoxLite agent base image, these print `,_jsx(_components.code,{children:`boxlite`}),` and `,_jsx(_components.code,{children:`Linux`}),`. You are now running commands inside the box.`]}),`\n`,_jsxs(_components.p,{children:[`Save the generated connection command. Keep its quoting, key path, and `,_jsx(_components.code,{children:`ProxyCommand`}),` intact; a command copied from someone else’s computer may reference their local files.`]}),`\n`,_jsx(Heading,{level:`2`,id:`reconnect`,children:`Reconnect`}),`\n`,_jsxs(_components.p,{children:[`Run your saved `,_jsx(_components.code,{children:`ssh`}),` command again. Keep the matching private key on your computer and your CLI signed in to the same Cloud account.`]}),`\n`,_jsx(_components.p,{children:`If the box is stopped, start it first:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`boxlite`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --context`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` app`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` start`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`$BOX`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`If SSH was disabled, enable the saved configuration on the running box:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`boxlite`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --context`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` app`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` ssh`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --enable`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`$BOX`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Then run your saved `,_jsx(_components.code,{children:`ssh`}),` command. You can also click `,_jsx(_components.strong,{children:`Enable`}),` in the Dashboard’s `,_jsx(_components.strong,{children:`SSH`}),` tab when available.`]}),`\n`,_jsx(Heading,{level:`2`,id:`leave-the-session-or-close-access`,children:`Leave the session or close access`}),`\n`,_jsx(_components.p,{children:`To leave the shell, run:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`exit`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The box keeps running. The public tunnel opened by the SSH proxy also remains open; SSH authentication still requires your private key.`}),`\n`,_jsxs(_components.p,{children:[`To close access, run both commands in your `,_jsx(_components.strong,{children:`local terminal`}),` while the box is running:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`boxlite`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --context`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` app`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` network`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` tunnel`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --revoke`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`$BOX`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` 22`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`boxlite`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --context`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` app`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` ssh`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --disable`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`$BOX`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Disabling SSH disconnects existing SSH clients. To return later, follow `,_jsx(_components.a,{href:`#reconnect`,children:`Reconnect`}),`; the proxy opens the tunnel again when you connect.`]}),`\n`,_jsxs(_components.p,{children:[`To stop the box itself, see `,_jsx(_components.a,{href:`/cloud/box-lifecycle`,children:`Box lifecycle`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`if-you-cannot-connect`,children:`If you cannot connect`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`What you see`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ssh`}),` is an unknown BoxLite command`]}),_jsx(_components.td,{children:`Install the latest CLI using the command above, then open a new terminal and try again.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Authentication fails, or the box cannot be found`}),_jsxs(_components.td,{children:[`Confirm the box ID and log in to the same Cloud account as the console, using the `,_jsx(_components.code,{children:`app`}),` context.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`SSH is disabled`}),_jsxs(_components.td,{children:[`Start the box, run `,_jsx(_components.code,{children:`boxlite --context app ssh --enable \"$BOX\"`}),`, then reuse your connection command.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`OpenSSH rejects private-key permissions`}),_jsxs(_components.td,{children:[`On macOS or Linux, run `,_jsx(_components.code,{children:`chmod 600 /path/to/your/private-key`}),`, substituting the actual key path.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Permission denied (publickey)`})}),_jsx(_components.td,{children:`Use the private key matching the box’s current SSH setup. Another setup may have replaced the authorized key.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The host fingerprint changed`}),_jsxs(_components.td,{children:[`Compare it with `,_jsx(_components.code,{children:`boxlite --context app ssh --status \"$BOX\"`}),` before updating your SSH known-host entry.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`The printed `,_jsx(_components.code,{children:`0.0.0.0:22`}),` is the guest’s listening address. Connect using the generated command, which routes through Cloud; you do not need a public box IP.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"SSH into a Cloud box","sidebarTitle":"SSH access","description":"Set up SSH, connect from your terminal, and reconnect to a BoxLite Cloud box without repeating setup.","href":"/cloud/ssh"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Before you start","slug":"before-you-start","depth":2,"children":[]},{"title":"Log in and prepare your box","slug":"log-in-and-prepare-your-box","depth":2,"children":[]},{"title":"Set up SSH once","slug":"set-up-ssh-once","depth":2,"children":[]},{"title":"Confirm your connection","slug":"confirm-your-connection","depth":2,"children":[]},{"title":"Reconnect","slug":"reconnect","depth":2,"children":[]},{"title":"Leave the session or close access","slug":"leave-the-session-or-close-access","depth":2,"children":[]},{"title":"If you cannot connect","slug":"if-you-cannot-connect","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"boxliteai","siteName":"BoxLite Documentation","title":"SSH into a Cloud box - BoxLite Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-05T03:01:02.079Z","originalFileLocation":"cloud/ssh.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Set up SSH, connect from your terminal, and reconnect to a BoxLite Cloud box without repeating setup.\">\u003cmeta data-mint-head name=\"application-name\" content=\"BoxLite Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/boxliteai/tR9zeyYgo5_n9CH3/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/boxliteai/tR9zeyYgo5_n9CH3/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/boxliteai/tR9zeyYgo5_n9CH3/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/boxliteai/tR9zeyYgo5_n9CH3/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/boxliteai/tR9zeyYgo5_n9CH3/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/boxliteai/tR9zeyYgo5_n9CH3/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/boxliteai/tR9zeyYgo5_n9CH3/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/boxliteai/tR9zeyYgo5_n9CH3/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/boxliteai/tR9zeyYgo5_n9CH3/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"SSH into a Cloud box - BoxLite Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Set up SSH, connect from your terminal, and reconnect to a BoxLite Cloud box without repeating setup.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"BoxLite Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.boxlite.ai/cloud/ssh\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://boxliteai.mintlify.app/_mintlify/api/og/v2?division=Boxes\u0026amp;title=SSH+into+a+Cloud+box\u0026amp;description=Set+up+SSH%2C+connect+from+your+terminal%2C+and+reconnect+to+a+BoxLite+Cloud+box+without+repeating+setup.\u0026amp;theme=1fd03f01b5a570bf36f0b4d4\u0026amp;signature=2076b0fa918372fa47031409315642fc0c4e3aa5d520dcc625fe40a28149d7de\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"SSH into a Cloud box - BoxLite Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Set up SSH, connect from your terminal, and reconnect to a BoxLite Cloud box without repeating setup.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://boxliteai.mintlify.app/_mintlify/api/og/v2?division=Boxes\u0026amp;title=SSH+into+a+Cloud+box\u0026amp;description=Set+up+SSH%2C+connect+from+your+terminal%2C+and+reconnect+to+a+BoxLite+Cloud+box+without+repeating+setup.\u0026amp;theme=1fd03f01b5a570bf36f0b4d4\u0026amp;signature=2076b0fa918372fa47031409315642fc0c4e3aa5d520dcc625fe40a28149d7de\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/boxliteai/tR9zeyYgo5_n9CH3/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"BoxLite Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#00B0F0\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.boxlite.ai/cloud/ssh\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/cloud/ssh.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.boxlite.ai/#organization\",\"name\":\"BoxLite Documentation\",\"url\":\"https://docs.boxlite.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/boxliteai/PJGMTNlEZYO0BQu3/logo/light.png?fit=max\u0026auto=format\u0026n=PJGMTNlEZYO0BQu3\u0026q=85\u0026s=ca289df85e44943aceb95cbf5e4725ea\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.boxlite.ai#website\",\"name\":\"BoxLite Documentation\",\"url\":\"https://docs.boxlite.ai\",\"publisher\":{\"@id\":\"https://docs.boxlite.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.boxlite.ai/cloud/ssh#webpage\",\"url\":\"https://docs.boxlite.ai/cloud/ssh\",\"name\":\"SSH into a Cloud box\",\"description\":\"Set up SSH, connect from your terminal, and reconnect to a BoxLite Cloud box without repeating setup.\",\"dateModified\":\"2026-11-05T03:01:02.079Z\",\"isPartOf\":{\"@id\":\"https://docs.boxlite.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.boxlite.ai/cloud/ssh#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.boxlite.ai/cloud/ssh#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Boxes\",\"item\":\"https://docs.boxlite.ai/cloud/boxes\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SSH into a Cloud box\",\"item\":\"https://docs.boxlite.ai/cloud/ssh\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.boxlite.ai/cloud/ssh#article\",\"headline\":\"SSH into a Cloud box\",\"name\":\"SSH into a Cloud box\",\"description\":\"Set up SSH, connect from your terminal, and reconnect to a BoxLite Cloud box without repeating setup.\",\"url\":\"https://docs.boxlite.ai/cloud/ssh\",\"mainEntityOfPage\":{\"@id\":\"https://docs.boxlite.ai/cloud/ssh#webpage\"},\"dateModified\":\"2026-11-05T03:01:02.079Z\",\"publisher\":{\"@id\":\"https://docs.boxlite.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.boxlite.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"BoxLite Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"BoxLite Documentation","nav":{"global":null,"tabs":[{"tab":"BoxLite Open Source","pages":[{"title":"BoxLite Open Source","href":""}]},{"tab":"BoxLite Cloud","groups":[{"group":"Getting started","icon":"cloud","root":{"title":"BoxLite Cloud","sidebarTitle":"What is Cloud","href":"/cloud"},"pages":[{"title":"BoxLite Cloud vs open source","sidebarTitle":"Cloud vs open source","href":"/cloud/vs-opensource"},{"title":"Run untrusted code on BoxLite Cloud","sidebarTitle":"Quickstart","href":"/cloud/quickstart"},{"title":"API keys and authentication","sidebarTitle":"API keys","href":"/cloud/api-keys"}]},{"group":"Boxes","icon":"cube","root":{"title":"Boxes","sidebarTitle":"Boxes","href":"/cloud/boxes"},"pages":[{"title":"Choose a size for a Cloud box","sidebarTitle":"Sizes","href":"/cloud/box-sizes"},{"title":"Box lifecycle on Cloud","sidebarTitle":"Lifecycle","href":"/cloud/box-lifecycle"},{"title":"Create, reuse, and remove a box from code","sidebarTitle":"From code","description":"The full create-start-use-remove cycle over REST, reusing a box by name, managing one from the console, and passing environment variables.","href":"/cloud/box-from-code"},{"title":"SSH into a Cloud box","sidebarTitle":"SSH access","href":"/cloud/ssh"}]},{"group":"Manually deploy an agent","icon":"robot","root":{"title":"Manually deploy an agent in a box","sidebarTitle":"Manual agent deployment","description":"Create a Cloud box, install your coding agent, and run a real task.","href":"/cloud/agent-in-box/index"},"pages":[{"title":"Deploy Claude Code on Cloud","sidebarTitle":"Claude Code","href":"/cloud/agent-in-box/claude-code"},{"title":"Deploy Codex on Cloud","sidebarTitle":"Codex","href":"/cloud/agent-in-box/codex"},{"title":"Deploy Pi on Cloud","sidebarTitle":"Pi","href":"/cloud/agent-in-box/pi"},{"title":"Deploy OpenCode on Cloud","sidebarTitle":"OpenCode","href":"/cloud/agent-in-box/opencode"},{"title":"Deploy Hermes on Cloud","sidebarTitle":"Hermes","href":"/cloud/agent-in-box/hermes"}]},{"group":"Images","icon":"layer-group","root":{"title":"Images","sidebarTitle":"Overview","href":"/cloud/images"},"pages":[{"title":"Use your own image","sidebarTitle":"Use your own image","href":"/cloud/use-your-image"},{"title":"Pin a build, and roll it back","sidebarTitle":"Pin a build","href":"/cloud/image-aliases"},{"title":"Use a private image","sidebarTitle":"Private images","href":"/cloud/private-images"},{"title":"What the catalog records","sidebarTitle":"The catalog","href":"/cloud/image-catalog"}]},{"group":"Volumes","icon":"database","root":{"title":"Volumes","sidebarTitle":"Volumes","href":"/cloud/volumes"},"pages":[{"title":"Create a volume and mount it into a box","sidebarTitle":"Mount a volume","href":"/cloud/mount-a-volume"},{"title":"Create, list, inspect, and delete volumes","sidebarTitle":"Volume CRUD","href":"/cloud/volume-operations"},{"title":"Keep data when the box is gone","sidebarTitle":"Data across boxes","href":"/cloud/data-across-boxes"},{"title":"Volume reference","sidebarTitle":"Reference","href":"/cloud/volume-reference"}]},{"group":"Network","icon":"globe","root":{"title":"Network","sidebarTitle":"Network","href":"/cloud/network"},"pages":[{"title":"How tunnels work","sidebarTitle":"Tunnels","href":"/cloud/tunnels"},{"title":"Serve HTTP from a box and get a public URL","sidebarTitle":"Preview URLs","href":"/cloud/serve-http"},{"title":"Forward a box port to a local port","sidebarTitle":"Port forwarding","href":"/cloud/port-forwarding"},{"title":"Read and write raw bytes over a tunnel","sidebarTitle":"Raw streams","href":"/cloud/raw-streams"},{"title":"Control inbound and outbound access to a box","sidebarTitle":"Network policy","href":"/cloud/network-policy"}]},{"group":"Pricing","icon":"credit-card","root":{"title":"Pricing","sidebarTitle":"Pricing","href":"/cloud/pricing"},"pages":[{"title":"What a box costs","sidebarTitle":"Box costs","href":"/cloud/box-costs"},{"title":"Stop paying for boxes you have finished with","sidebarTitle":"Cost controls","href":"/cloud/cost-controls"},{"title":"Wallet or a plan?","sidebarTitle":"Choosing a plan","href":"/cloud/plans"},{"title":"Managing billing","sidebarTitle":"Managing billing","href":"/cloud/billing"}]}]},{"tab":"Use cases","pages":[{"title":"Use cases","href":"/use-cases"}]}]},"basePath":"","title":"SSH into a Cloud box - BoxLite Documentation","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":[],"chunks":[]}