[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"auth:me":3,"site-config":5,"blog-post-en-ssh-multi-environment":95},{"user":4,"membership":4},null,{"settings":6,"products":22,"navigation":37,"oauth":88,"endpoints":90},{"site.name":7,"site.tagline":8,"site.description":9,"site.tagline.en":10,"site.description.en":11,"site.keywords":12,"site.icp":13,"site.police":14,"site.contact_email":15,"site.company":16,"site.copyright":16,"site.social.github":17,"site.social.x":16,"site.social.wechat":16,"site.support_url":16,"site.announcement":16,"trial.enabled":18,"trial.days":19,"trial.grant_on":20,"trial.enabled_at":16,"site.url":21},"DSH Remote","管理远端 DSH 的客户端：装、连、转、用一个窗口。","DSH Remote 是 DeepSeek Harness 的远程客户端：装好、连上、转发、打开，四件事一个窗口。","The remote client for DeepSeek Harness: install, connect, forward, work.","DSH Remote is the remote client for DeepSeek Harness: four jobs, one window.","DeepSeek Harness,DSH,DSH Remote,远程客户端,SSH 多环境,端口转发,DSH 生命周期,dsh-devtools,VSCode Remote,远程开发,AI 编程","赣ICP备2026027330号-1","赣公网安备36112402000139号","support@dshremote.cn","","https:\u002F\u002Fgithub.com\u002Fzhanglaian\u002Fdsh-remote",true,7,"register","https:\u002F\u002Fdshremote.cn",[23,31],{"slug":24,"name":25,"kind":26,"summary":27,"icon":28,"latestVersion":29,"minSupportedVersion":30},"dsh-remote","DSH Remote 桌面端","desktop","Windows \u002F macOS \u002F Linux 桌面客户端","i-lucide-monitor","1.2.0","0.8.0",{"slug":32,"name":33,"kind":34,"summary":35,"icon":36,"latestVersion":4,"minSupportedVersion":4},"dsh-mobile","DSH Remote 手机端","mobile","Android \u002F iOS 手机客户端","i-lucide-smartphone",{"main":38,"footer":63},[39,43,47,51,55,59],{"key":40,"to":41,"icon":42},"nav.download","\u002Fdownload","i-lucide-download",{"key":44,"to":45,"icon":46},"nav.pricing","\u002Fpricing","i-lucide-tag",{"key":48,"to":49,"icon":50},"nav.docs","\u002Fdocs","i-lucide-book-open",{"key":52,"to":53,"icon":54},"nav.blog","\u002Fblog","i-lucide-newspaper",{"key":56,"to":57,"icon":58},"nav.changelog","\u002Fchangelog","i-lucide-list",{"key":60,"to":61,"icon":62},"nav.about","\u002Fabout","i-lucide-info",[64,70,79],{"titleKey":65,"items":66},"footer.product",[67,68,69],{"key":40,"to":41},{"key":44,"to":45},{"key":56,"to":57},{"titleKey":71,"items":72},"footer.resources",[73,74,75,76],{"key":48,"to":49},{"key":52,"to":53},{"key":60,"to":61},{"key":77,"to":78},"nav.contact","\u002Fcontact",{"titleKey":80,"items":81},"footer.legal",[82,85],{"key":83,"to":84},"nav.privacy","\u002Flegal\u002Fprivacy",{"key":86,"to":87},"nav.terms","\u002Flegal\u002Fterms",{"providers":89},[],{"policy":91,"desktopLatest":92,"appLatest":93,"announcements":94},"\u002Fapi\u002Fv1\u002Fclient\u002Fpolicy","\u002Fapi\u002Fv1\u002Fdesktop\u002Flatest","\u002Fapi\u002Fv1\u002Fapp\u002Flatest","\u002Fapi\u002Fv1\u002Fannouncements",{"post":96,"locale":143,"requestedLocale":143,"fallback":142,"related":144},{"slug":97,"title":98,"excerpt":99,"html":100,"toc":101,"cover":4,"category":136,"tags":4,"publishedAt":137,"updatedAt":138,"seoTitle":139,"seoDescription":140,"ogImage":4,"canonical":4,"keywords":141,"noindex":142},"ssh-multi-environment","SSH multi-environment management: one profile per machine","dev, staging and prod should not mean re-entering credentials. Each machine becomes a profile — its own connection, rules, tabs and credentials — switched one at a time.","\u003Cblockquote>\n\u003Cp>\u003Cstrong>In one sentence:\u003C\u002Fstrong> a profile is one SSH connection plus its own rule table, its own tabs and its own credentials; switching closes the old environment as a whole and brings up the new one, and a failed switch rolls everything back.\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Ch2 id=\"the-hard-part-is-never-the-connecting\">The hard part is never the connecting\u003C\u002Fh2>\n\u003Cp>Two lines on dev, a look at staging, then a config check on prod. Every hop means retyping the host, reselecting the key, and remembering which port the dev server uses over there.\u003C\u002Fp>\n\u003Cp>Worse, ports and tabs leak between environments: you forward the old machine's ports on the new one, and the page shows things from the environment you just left.\u003C\u002Fp>\n\u003Cp>Multi-environment management fixes that by making \u003Cstrong>each machine a complete profile\u003C\u002Fstrong> and switching only which one is in effect.\u003C\u002Fp>\n\u003Ch2 id=\"what-a-profile-holds\">What a profile holds\u003C\u002Fh2>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Part\u003C\u002Fth>\n\u003Cth>What it is\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>Connection\u003C\u002Ftd>\n\u003Ctd>Host, port, username, password or private key (optionally with a passphrase)\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Channel\u003C\u002Ftd>\n\u003Ctd>SSH, this computer, or just a URL\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Forwarding rules\u003C\u002Ftd>\n\u003Ctd>Automatic and hand-written rules belonging to this profile; identical ids across profiles do not collide\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Tabs\u003C\u002Ftd>\n\u003Ctd>What you had open comes back when you switch back\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Credentials\u003C\u002Ftd>\n\u003Ctd>One ciphertext per profile, in the OS key store\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>Because rules and tabs travel with the profile, switching back \u003Cstrong>restores\u003C\u002Fstrong> things rather than making you set them up again.\u003C\u002Fp>\n\u003Ch2 id=\"adding-and-switching\">Adding and switching\u003C\u002Fh2>\n\u003Cp>\u003Cstrong>Add:\u003C\u002Fstrong> Settings → SSH connections → New. The form opens centred with its buttons pinned to the bottom; fill host, port, username, then choose a password or a key.\u003C\u002Fp>\n\u003Cp>Each list row shows the name, \u003Ccode>user@host\u003C\u002Fcode>, a status dot and whether credentials are saved. Per row you can edit, \u003Cstrong>duplicate\u003C\u002Fstrong> (handy for two accounts on one host), re-probe (read-only — installs nothing), or delete (with confirmation).\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Switch:\u003C\u002Fstrong> three ways, depending on where your hands are.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>The floating strip lists one row per environment; click a row.\u003C\u002Fli>\n\u003Cli>\u003Ccode>Ctrl\u002FCmd+Shift+P\u003C\u002Fcode> from anywhere, \u003Cstrong>including while focus is inside the embedded page\u003C\u002Fstrong>. The panel supports typing to filter, \u003Ccode>↑↓\u003C\u002Fcode>, \u003Ccode>Enter\u003C\u002Fcode>, \u003Ccode>Esc\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Click the row in Settings → SSH connections.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"single-active-what-actually-happens-on-a-switch\">Single-active: what actually happens on a switch\u003C\u002Fh2>\n\u003Cp>Exactly \u003Cstrong>one environment is live at a time\u003C\u002Fstrong>. That is a deliberate decision, not laziness: parallel connections sound convenient, but in practice ports, tabs and &quot;which machine am I on&quot; all fight each other, and you end up with sessions running remotely that nobody is looking at.\u003C\u002Fp>\n\u003Cp>A switch is &quot;close the old one as a whole (connection, tunnels, pages), then attach the new one&quot;. Three behaviours are built around that:\u003C\u002Fp>\n\u003Cp>\u003Cstrong>1. The local port stays, so the page origin stays.\u003C\u002Fstrong> Tunnel entries reuse the same local port where possible, which keeps the origin stable — the remote DSH keeps its login state, \u003Ccode>localStorage\u003C\u002Fcode> and session list. The page reloads once; you are not bounced back to a sign-in screen.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>2. The machine you left keeps running.\u003C\u002Fstrong> The agent never runs inside the client; switching just changes which machine the window is looking at. Before switching away, you are told how many services are still running over there.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>3. A failed switch rolls back as a whole.\u003C\u002Fstrong> Config, tunnel and page return to the machine you came from, with the reason stated. No half-state where the connection is new but the rules are old.\u003C\u002Fp>\n\u003Ch2 id=\"credentials-and-host-keys\">Credentials and host keys\u003C\u002Fh2>\n\u003Cp>\u003Cstrong>Passwords and keys\u003C\u002Fstrong> go through the OS key store: DPAPI on Windows, Keychain on macOS, libsecret on Linux.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>One ciphertext per profile, so one corrupt file does not take every machine down with it.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Platforms without a usable key store refuse to save\u003C\u002Fstrong> (for example Linux without a keyring) instead of falling back to plaintext. A silent downgrade is far more dangerous than not saving.\u003C\u002Fli>\n\u003Cli>There is no IPC to read a password back. If you forget it, you retype it once.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cstrong>Host keys\u003C\u002Fstrong> use TOFU — trust on first use. The first connection to a machine asks you to confirm its \u003Ccode>SHA256\u003C\u002Fcode> fingerprint; if it changes later, you get a red warning.\u003C\u002Fp>\n\u003Cp>This is not ceremony. An encrypted tunnel does not stop a man in the middle, who can build a separate encrypted link on each side; verifying the host key is the part that does. The fingerprint matches what \u003Ccode>ssh-keyscan\u003C\u002Fcode> and OpenSSH's first-connection prompt print, so you can cross-check with system tools.\u003C\u002Fp>\n\u003Ch2 id=\"after-a-drop-retries-but-not-for-everything\">After a drop: retries, but not for everything\u003C\u002Fh2>\n\u003Cp>Network drops reconnect automatically with backoff of 1s → 2s → 4s → 8s → 15s, and the UI shows &quot;retry N&quot;. The count has no cap, but it is always visible — &quot;retry 7&quot; is useful information that maybe you should check the network.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Four kinds of error are never retried:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Authentication failure (wrong password or key).\u003C\u002Fli>\n\u003Cli>A changed host key.\u003C\u002Fli>\n\u003Cli>A key that cannot be read or parsed.\u003C\u002Fli>\n\u003Cli>Permission denied or disk full.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>The reason is practical: hammering a failed authentication gets \u003Ccode>fail2ban\u003C\u002Fcode> to ban your IP, so the user experiences &quot;the more it reconnects, the less it connects&quot; after one typo. A local problem will not fix itself on the ten-thousandth attempt either.\u003C\u002Fp>\n\u003Cp>Separately, \u003Cstrong>connecting or disconnecting never disturbs the page you are reading\u003C\u002Fstrong>: no address change, no reload, no dialog. If the page reports a network interruption, that is the page talking, not the client.\u003C\u002Fp>\n\u003Ch2 id=\"three-channels-what-we-can-do-on-that-machine\">Three channels: what we can do on that machine\u003C\u002Fh2>\n\u003Cp>A channel is not network topology; it is \u003Cstrong>how many levers we have on the machine where DSH lives\u003C\u002Fstrong>:\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Channel\u003C\u002Fth>\n\u003Cth>Run commands\u003C\u002Fth>\n\u003Cth>Read files\u003C\u002Fth>\n\u003Cth>Forward\u003C\u002Fth>\n\u003Cth>Typical use\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>ssh\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>over SSH\u003C\u002Ftd>\n\u003Ctd>over SSH\u003C\u002Ftd>\n\u003Ctd>required\u003C\u002Ftd>\n\u003Ctd>A remote dev machine\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>local\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>locally\u003C\u002Ftd>\n\u003Ctd>locally\u003C\u002Ftd>\n\u003Ctd>not needed\u003C\u002Ftd>\n\u003Ctd>DSH runs on this computer\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>none\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>no\u003C\u002Ftd>\n\u003Ctd>no\u003C\u002Ftd>\n\u003Ctd>no\u003C\u002Ftd>\n\u003Ctd>Just a URL, just the page\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>Three consequences follow:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>The local channel has no forwarding step.\u003C\u002Fstrong> The service is already here, so the page opens \u003Ccode>127.0.0.1:&lt;real port&gt;\u003C\u002Fcode> directly.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Lifecycle management needs \u003Ccode>ssh\u003C\u002Fcode> or \u003Ccode>local\u003C\u002Fcode>.\u003C\u002Fstrong> With \u003Ccode>none\u003C\u002Fcode> there is no runtime to read, so nothing can be installed or started.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Changing the channel is in-place\u003C\u002Fstrong>: automatic rules are dropped, hand-written ones are kept but marked as not in effect.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"cf-ssh-still-ssh-just-routed-through-cloudflare\">cf-ssh: still SSH, just routed through Cloudflare\u003C\u002Fh2>\n\u003Cp>cf-ssh is not a fourth channel and not a new connection type: \u003Cstrong>it is still SSH\u003C\u002Fstrong>, except the TCP hop to sshd goes over \u003Ccode>wss:\u002F\u002F&lt;tunnel domain&gt;\u003C\u002Fcode> instead of a direct \u003Ccode>host:port\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>What you do not need is the interesting part:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>No \u003Ccode>cloudflared\u003C\u002Fcode> binary on your machine.\u003C\u002Fli>\n\u003Cli>No local port.\u003C\u002Fli>\n\u003Cli>No child process.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>The remote half is provided by the plugin's remote access, which exposes sshd as a domain through a Cloudflare Quick Tunnel. Remember the v1 boundary: \u003Cstrong>only tunnels without Cloudflare Access protection are supported\u003C\u002Fstrong>, and Quick Tunnels have no SLA and rotate their domains.\u003C\u002Fp>\n\u003Ch2 id=\"boundaries\">Boundaries\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Cstrong>No parallel connections.\u003C\u002Fstrong> Single-active is a deliberate model, described above.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Credentials are never plaintext.\u003C\u002Fstrong> Linux without a keyring refuses to save — a security trade-off on purpose.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Tunnel entries bind \u003Ccode>127.0.0.1\u003C\u002Fcode> only\u003C\u002Fstrong>, so other machines on your LAN cannot reach them.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The server must allow forwarding.\u003C\u002Fstrong> With \u003Ccode>AllowTcpForwarding no\u003C\u002Fcode>, rules fail with \u003Ccode>administratively prohibited\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The local channel does not take over your processes.\u003C\u002Fstrong> It reads state and opens no listeners.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"faq\">FAQ\u003C\u002Fh2>\n\u003Cp>\u003Cstrong>Can I watch two machines at once?\u003C\u002Fstrong> No — one environment is live at a time. Switch over and back; config and tabs are preserved.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Does the remote service stop when I switch away?\u003C\u002Fstrong> No. The agent and the services keep running remotely; the client simply stops looking at them.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Where are passwords stored?\u003C\u002Fstrong> In the OS key store (DPAPI \u002F Keychain \u002F libsecret), one ciphertext per profile. They cannot be read back and are never written to the settings file.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Why does it stop retrying when it cannot connect?\u003C\u002Fstrong> Authentication failures, changed fingerprints, unreadable keys and full disks only make things worse on retry (an IP ban, for instance). Network errors keep retrying with backoff and a visible count.\u003C\u002Fp>\n\u003Ch2 id=\"read-next\">Read next\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"\u002Fen\u002Fblog\u002Fwhat-is-dsh-remote\">What is DSH Remote? The four capabilities\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fen\u002Fblog\u002Fdsh-lifecycle-management\">DSH lifecycle management: install it, start it, keep it running\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fen\u002Fblog\u002Fport-forwarding\">Port forwarding: a rule table per environment\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fen\u002Fblog\u002Fdsh-remote-vs-vscode-remote\">DSH Remote vs VSCode Remote\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fen\u002Fdocs\u002Fguides\u002Fssh-tunnel\">When it will not connect\u003C\u002Fa> · \u003Ca href=\"\u002Fen\u002Fdocs\u002Freference\u002Fconfig\">Where the settings live\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n",[102,106,109,112,115,118,121,124,127,130,133],{"level":103,"text":104,"id":105},2,"The hard part is never the connecting","the-hard-part-is-never-the-connecting",{"level":103,"text":107,"id":108},"What a profile holds","what-a-profile-holds",{"level":103,"text":110,"id":111},"Adding and switching","adding-and-switching",{"level":103,"text":113,"id":114},"Single-active: what actually happens on a switch","single-active-what-actually-happens-on-a-switch",{"level":103,"text":116,"id":117},"Credentials and host keys","credentials-and-host-keys",{"level":103,"text":119,"id":120},"After a drop: retries, but not for everything","after-a-drop-retries-but-not-for-everything",{"level":103,"text":122,"id":123},"Three channels: what we can do on that machine","three-channels-what-we-can-do-on-that-machine",{"level":103,"text":125,"id":126},"cf-ssh: still SSH, just routed through Cloudflare","cf-ssh-still-ssh-just-routed-through-cloudflare",{"level":103,"text":128,"id":129},"Boundaries","boundaries",{"level":103,"text":131,"id":132},"FAQ","faq",{"level":103,"text":134,"id":135},"Read next","read-next","Guides","2026-11-01T02:00:00.000Z","2026-11-03T05:04:04.000Z","SSH multi-environment management for many dev machines","DSH Remote turns each machine into a profile: one SSH connection, its own forwarding rules and tabs, its own credentials. Single-active switching keeps the page origin, a failed switch rolls back as a whole, credentials live in the OS key store, and host keys use TOFU.","SSH multi-environment,switch servers,SSH profiles,TOFU host key,single active environment",false,"en",[145,149,153],{"slug":146,"title":147,"publishedAt":148},"dsh-lifecycle-management","DSH lifecycle management: install, start, pin a version, roll back","2026-11-02T02:00:00.000Z",{"slug":150,"title":151,"publishedAt":152},"port-forwarding","Port forwarding: open remote services the VSCode Remote way","2026-10-31T02:00:00.000Z",{"slug":154,"title":155,"publishedAt":156},"dsh-devtools-plugin","dsh-devtools: a dev workbench inside your remote DSH","2026-10-30T02:00:00.000Z"]