[{"data":1,"prerenderedAt":386},["ShallowReactive",2],{"page-\u002Finstances\u002Fconnect":3,"surround-\u002Finstances\u002Fconnect":379},{"id":4,"title":5,"body":6,"description":371,"extension":372,"meta":373,"navigation":374,"path":375,"seo":376,"stem":377,"__hash__":378},"docs\u002Finstances\u002Fconnect.md","Connect to an instance",{"type":7,"value":8,"toc":364},"minimark",[9,13,78,83,95,98,102,183,186,224,245,249,255,284,294,304,310,314,320,336,340,360],[10,11,12],"p",{},"This page covers the three ways to open a shell on a running instance, and how to keep work running when you disconnect.",[14,15,16,32],"table",{},[17,18,19],"thead",{},[20,21,22,26,29],"tr",{},[23,24,25],"th",{},"Method",[23,27,28],{},"Needs",[23,30,31],{},"Best for",[33,34,35,47,67],"tbody",{},[20,36,37,41,44],{},[38,39,40],"td",{},"Browser terminal",[38,42,43],{},"Nothing",[38,45,46],{},"Quick access from any browser.",[20,48,49,52,55],{},[38,50,51],{},"SSH",[38,53,54],{},"An SSH key and an image that can run an SSH server",[38,56,57,58,62,63,66],{},"Your own terminal, IDE remote development, ",[59,60,61],"code",{},"scp"," and ",[59,64,65],{},"rsync",".",[20,68,69,72,75],{},[38,70,71],{},"CLI",[38,73,74],{},"The CLI, signed in",[38,76,77],{},"Scripts, and a shell without an SSH key.",[79,80,82],"h2",{"id":81},"open-the-browser-terminal","Open the browser terminal",[10,84,85,86,90,91,94],{},"The instance's ",[87,88,89],"strong",{},"Terminal"," tab opens a shell in a tmux session named ",[59,92,93],{},"default",", so your work keeps running if you close the tab or lose your connection. The session menu opens or creates other named sessions.",[10,96,97],{},"The terminal closes after 30 minutes without activity. Processes in its tmux session keep running.",[79,99,101],{"id":100},"connect-with-ssh","Connect with SSH",[103,104,106,111,128,132,138,174,177],"steps",{"level":105},"4",[107,108,110],"h4",{"id":109},"add-an-ssh-key","Add an SSH key",[10,112,113,114,123,124,66],{},"Add your public key on the ",[115,116,122],"a",{"href":117,"rel":118,"target":121},"https:\u002F\u002Fconsole.cloud.featherless.ai\u002Fcredentials\u002Fssh-keys",[119,120],"noopener","noreferrer","_blank","Credentials page",". See ",[115,125,127],{"href":126},"\u002Fget-started\u002Fcredentials#add-an-ssh-key","SSH keys",[107,129,131],{"id":130},"copy-the-ssh-command","Copy the SSH command",[10,133,85,134,137],{},[87,135,136],{},"Connect"," tab shows the SSH command once SSH is ready:",[139,140,145],"pre",{"className":141,"code":142,"language":143,"meta":144,"style":144},"language-bash shiki shiki-themes github-dark-default","ssh \u003Cinstance-id>@ssh.cloud.featherless.ai\n","bash","",[59,146,147],{"__ignoreMap":144},[148,149,152,156,160,164,168,171],"span",{"class":150,"line":151},"line",1,[148,153,155],{"class":154},"sQhOw","ssh",[148,157,159],{"class":158},"suJrU"," \u003C",[148,161,163],{"class":162},"s9uIt","instance-i",[148,165,167],{"class":166},"sZEs4","d",[148,169,170],{"class":158},">",[148,172,173],{"class":162},"@ssh.cloud.featherless.ai\n",[107,175,136],{"id":176},"connect",[10,178,179,180,66],{},"Run the command in your terminal. You log in as ",[59,181,182],{},"root",[10,184,185],{},"The CLI can build the command for you, using your SSH config and agent:",[139,187,189],{"className":141,"code":188,"language":143,"meta":144,"style":144},"featherless-cloud instance ssh my-instance\nfeatherless-cloud instance ssh my-instance -i ~\u002F.ssh\u002Fwork_ed25519\n",[59,190,191,205],{"__ignoreMap":144},[148,192,193,196,199,202],{"class":150,"line":151},[148,194,195],{"class":154},"featherless-cloud",[148,197,198],{"class":162}," instance",[148,200,201],{"class":162}," ssh",[148,203,204],{"class":162}," my-instance\n",[148,206,208,210,212,214,217,221],{"class":150,"line":207},2,[148,209,195],{"class":154},[148,211,198],{"class":162},[148,213,201],{"class":162},[148,215,216],{"class":162}," my-instance",[148,218,220],{"class":219},"sFSAA"," -i",[148,222,223],{"class":162}," ~\u002F.ssh\u002Fwork_ed25519\n",[10,225,226,227,230,231,230,234,230,237,240,241,244],{},"SSH works with official templates. For a custom image, it works when the image runs as root and includes an SSH server, or a package manager (",[59,228,229],{},"apt",", ",[59,232,233],{},"dnf",[59,235,236],{},"yum",[59,238,239],{},"apk"," or ",[59,242,243],{},"zypper",") that can install one. The browser terminal works with any image.",[79,246,248],{"id":247},"keep-programs-running-with-tmux","Keep programs running with tmux",[10,250,251,252,254],{},"Every instance has a tmux session named ",[59,253,93],{},", shared with the browser terminal. To attach to it from your computer:",[139,256,258],{"className":141,"code":257,"language":143,"meta":144,"style":144},"featherless-cloud instance tmux my-instance\nfeatherless-cloud instance tmux my-instance training\n",[59,259,260,271],{"__ignoreMap":144},[148,261,262,264,266,269],{"class":150,"line":151},[148,263,195],{"class":154},[148,265,198],{"class":162},[148,267,268],{"class":162}," tmux",[148,270,204],{"class":162},[148,272,273,275,277,279,281],{"class":150,"line":207},[148,274,195],{"class":154},[148,276,198],{"class":162},[148,278,268],{"class":162},[148,280,216],{"class":162},[148,282,283],{"class":162}," training\n",[10,285,286,287,290,291,66],{},"The second command attaches to, or creates, a session named ",[59,288,289],{},"training",". Detach with ",[87,292,293],{},"Ctrl-b d",[10,295,296,297,299,300,303],{},"To put every SSH login in the ",[59,298,93],{}," session automatically, switch on ",[87,301,302],{},"Auto start tmux in SSH sessions"," when you deploy or edit the instance.",[305,306,307],"note",{},[10,308,309],{},"tmux sessions end when the instance stops or restarts.",[79,311,313],{"id":312},"open-a-shell-from-the-cli","Open a shell from the CLI",[10,315,316,319],{},[59,317,318],{},"instance shell"," opens the same shell as the browser terminal, without an SSH key:",[139,321,323],{"className":141,"code":322,"language":143,"meta":144,"style":144},"featherless-cloud instance shell my-instance\n",[59,324,325],{"__ignoreMap":144},[148,326,327,329,331,334],{"class":150,"line":151},[148,328,195],{"class":154},[148,330,198],{"class":162},[148,332,333],{"class":162}," shell",[148,335,204],{"class":162},[79,337,339],{"id":338},"next-steps","Next steps",[341,342,343,352],"card-group",{},[344,345,349],"card",{"icon":346,"title":347,"to":348},"i-lucide-globe","Expose ports","\u002Finstances\u002Fports",[10,350,351],{},"Reach web apps and APIs over HTTPS.",[344,353,357],{"icon":354,"title":355,"to":356},"i-lucide-folder-up","Transfer files","\u002Fstorage\u002Ftransfer-files",[10,358,359],{},"Move data in and out of network volumes.",[361,362,363],"style",{},"html pre.shiki code .sQhOw, html code.shiki .sQhOw{--shiki-default:#FFA657}html pre.shiki code .suJrU, html code.shiki .suJrU{--shiki-default:#FF7B72}html pre.shiki code .s9uIt, html code.shiki .s9uIt{--shiki-default:#A5D6FF}html pre.shiki code .sZEs4, html code.shiki .sZEs4{--shiki-default:#E6EDF3}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .sFSAA, html code.shiki .sFSAA{--shiki-default:#79C0FF}",{"title":144,"searchDepth":207,"depth":207,"links":365},[366,367,368,369,370],{"id":81,"depth":207,"text":82},{"id":100,"depth":207,"text":101},{"id":247,"depth":207,"text":248},{"id":312,"depth":207,"text":313},{"id":338,"depth":207,"text":339},"Work on your instance from the browser, your own terminal or your IDE, without losing your session.","md",{},true,"\u002Finstances\u002Fconnect",{"title":5,"description":371},"instances\u002Fconnect","4SaJlTP8Tu3T2M_y-69YmfUBoUBaopswlsrD8Cs5z_Y",[380,384],{"title":381,"path":382,"description":383},"Manage instances","\u002Finstances\u002Fmanage","Pay only for the instances you're using, and change or remove them as your work changes.",{"title":347,"path":348,"description":385},"Reach a web app, notebook or API on your instance at its own HTTPS address, without SSH.",1794932598292]