Create local, remote and dynamic SOCKS5 SSH tunnels, start them on launch and keep them alive.
Listen to this pageabout 4 min
Port forwarding sends network traffic through an SSH connection. Open Port Forwarding in the sidebar to create saved rules, start and stop them, and see how many connections each one is carrying.
A running local rule with one connection, and a stopped SOCKS5 rule.
Rule types
Type
What it does
Example
Local
Listens on your machine and forwards to a destination reached from the SSH host
127.0.0.1:2200 → 127.0.0.1:22
Remote
Listens on the SSH host and forwards to a destination on your machine
Expose a local dev server on the remote host
Dynamic SOCKS5
Runs a SOCKS5 proxy on your machine and routes any TCP connection through the SSH host
127.0.0.1:1080
A rule always goes through a saved host (the SSH Host), using that host’s stored credentials. You don’t need an open terminal tab: YourSSH connects to the host on its own, and through its connection chain if it has one.
Create a rule
1
Open the editor
Go to Port Forwarding and click New rule. The New Port Forward Rule panel opens on the right.
2
Name the rule and pick a type
Enter a Label, then choose the Type: Local, Remote or Dynamic SOCKS5.
The type menu.
3
Set the addresses
Fill in Local Host and Port (the address that listens on your machine). For Local and Remote rules, also fill in Remote Host and Port for the destination. A Dynamic SOCKS5 rule needs only the local address, so the remote fields disappear.
4
Choose the SSH host
Pick the SSH Host the tunnel runs through. The field is marked optional so you can save a draft, but a rule without a host can’t start. It reports Select an SSH host first.
5
Optionally auto-start
Tick Auto-start on launch to bring the tunnel up each time YourSSH starts.
6
Save
Click Add Rule.
A local rule filled in: localhost port 2200 to port 22 on the remote side, through Demo Server.
A dynamic SOCKS5 rule has no remote host or port.
Validation
The editor checks the form when you save:
Label, Local Host and, for local and remote rules, Remote Host can’t be empty. A missing value shows Required.
Each Port must be a number from 1 to 65535. Anything else shows 1–65535 under the field.
A port of 70000 is rejected.
Start and stop
Each rule has a button on the right: the play button starts it and the stop button stops it. Several tunnels can run at once, and each one is independent.The status dot on the left shows the state:
Dot
State
Grey
Idle
Amber
Connecting, or reconnecting (the rule also shows reconnecting…)
Green
Active
Red
Error. The message appears under the rule, for example that a port is already in use
An active rule shows a live connection count such as 1 conn.If a rule fails to start, check the message under it. Common causes are a local port already in use, no SSH host selected, or the host no longer existing.
Auto-reconnect
If the SSH connection drops while a tunnel is running, the rule switches to reconnecting… and YourSSH reconnects with exponential backoff, starting at 2 seconds and doubling up to 30 seconds. Local listeners stay bound while it retries, so clients keep the same local port. Stopping the rule cancels the retry.
Edit, duplicate and delete
Click a rule, or right-click and choose Edit, to change it. The panel title is Edit Port Forward Rule and the button is Save. If the rule is running, stop and start it again to apply the change.
Right-click and choose Duplicate to copy a rule. The copy is named … (copy) and never auto-starts.
Hover a rule and click the trash icon, or right-click and choose Delete. YourSSH asks Delete rule? first, naming the label and endpoints, with Cancel selected by default. After you confirm, a running rule is stopped and removed. Deleting a host also stops the tunnels that use it.
Clicking a rule opens it in the editor.
Example: reach a database on the SSH host
To connect a SQL client to a PostgreSQL server that only listens on the SSH host:
Field
Value
Label
Postgres
Type
Local
Local Host / Port
127.0.0.1 / 5432
Remote Host / Port
127.0.0.1 / 5432
SSH Host
your database host
Start the rule, then point your client at 127.0.0.1:5432.
Use tunnels in Web Tools
The Web Tools plugin has a Port Tunnels tool that works with these forwarded ports, so you can open a tunnelled web service in the in-app browser. See Web Tools.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"YourSSH","description":"YourSSH is a fast, open-source SSH, SFTP, RDP and VNC client for macOS, Windows, Linux and Android.","colors":{"primary":"#E87C08","light":"#F3A231","dark":"#C76A06"},"logo":{"light":"https://mintcdn.com/your-ssh/hXl_1tpHLWW6nFrV/logo/light.svg?fit=max\u0026auto=format\u0026n=hXl_1tpHLWW6nFrV\u0026q=85\u0026s=af6f8821423df7db3617197a48b29757","dark":"https://mintcdn.com/your-ssh/hXl_1tpHLWW6nFrV/logo/dark.svg?fit=max\u0026auto=format\u0026n=hXl_1tpHLWW6nFrV\u0026q=85\u0026s=33ae26e05f50dbde0850947ac54a70a6","href":"https://github.com/YoursshLabs/yourssh"},"favicon":"https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/favicon.svg?fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=eacbd306aeb80a62ccd4aec8b3417480","appearance":{"default":"dark"},"navbar":{"links":[{"href":"https://github.com/YoursshLabs/yourssh/issues","label":"Issues"}],"primary":{"type":"button","label":"Download","href":"https://github.com/YoursshLabs/yourssh/releases/latest"}},"footer":{"socials":{"github":"https://github.com/YoursshLabs/yourssh"}},"icons":{"library":"lucide"},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/YoursshLabs/yourssh"},{"anchor":"Releases","icon":"download","href":"https://github.com/YoursshLabs/yourssh/releases"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"your-ssh","hasAudioNarration":true,"actualSubdomain":"your-ssh","customDomains":["yoursshlabs.com"],"gitSource":{"type":"github","owner":"yoursshlabs","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6af6c6629292933daccbd3f9"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af6e3a7af41c6763ee813eb","clientVersion":"0.0.4167","searchFilterCounts":[{"language":"default","tag":"User guide","count":23},{"language":"default","tag":"Connections","count":6},{"language":"default","tag":"Developer guide","count":5},{"language":"default","tag":"Tools","count":5},{"language":"default","tag":"Develop","count":3},{"language":"default","tag":"Get started","count":3},{"language":"default","tag":"Security","count":3},{"language":"default","tag":"Settings and sync","count":3},{"language":"default","tag":"Plugins","count":2},{"language":"default","tag":"Remote desktop","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"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":"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":"editor-metadata","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},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"user-guide/port-forwarding","slug":"/user-guide/port-forwarding","pageMetadata":{"title":"Port forwarding","description":"Create local, remote and dynamic SOCKS5 SSH tunnels, start them on launch and keep them alive.","icon":"arrow-left-right","href":"/user-guide/port-forwarding"},"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: \"Create local, remote and dynamic SOCKS5 SSH tunnels, start them on launch and keep them alive.\"\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`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Frame,Heading,OptimizedImage,Step,Steps,Table}=_components;if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Port forwarding sends network traffic through an SSH connection. Open `,_jsx(_components.strong,{children:`Port Forwarding`}),` in the sidebar to create saved rules, start and stop them, and see how many connections each one is carrying.`]}),`\n`,_jsx(Frame,{caption:`A running local rule with one connection, and a stopped SOCKS5 rule.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/09-running-connections.png?fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=c01637f65ef5af71d3976c9ec1f325b3`,alt:`Port Forwarding list with a running local rule and an idle dynamic SOCKS5 rule`,\"data-og-width\":`1440`,width:`1440`,\"data-og-height\":`868`,height:`868`,\"data-path\":`images/08-port-forwarding/09-running-connections.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/09-running-connections.png?w=280\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=2b79ed066cf97a0e14c5e7ef7600ae75 280w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/09-running-connections.png?w=560\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=07c7b3cdff7c110577e5be5b710381b2 560w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/09-running-connections.png?w=840\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=42faaefeaf74b4e31dd55dda90798b4b 840w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/09-running-connections.png?w=1100\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=f145aa6aa01b86c8d990655141cea459 1100w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/09-running-connections.png?w=1650\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=6f948e4ebfbc9e3b3d5fe13e66d401ec 1650w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/09-running-connections.png?w=2500\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=ad95051b95bf46b122ead318196190e1 2500w`})}),`\n`,_jsx(Heading,{level:`2`,id:`rule-types`,children:`Rule types`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`What it does`}),_jsx(_components.th,{children:`Example`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Local`})}),_jsx(_components.td,{children:`Listens on your machine and forwards to a destination reached from the SSH host`}),_jsxs(_components.td,{\"data-numeric\":`true`,children:[_jsx(_components.code,{children:`127.0.0.1:2200`}),` → `,_jsx(_components.code,{children:`127.0.0.1:22`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Remote`})}),_jsx(_components.td,{children:`Listens on the SSH host and forwards to a destination on your machine`}),_jsx(_components.td,{children:`Expose a local dev server on the remote host`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Dynamic SOCKS5`})}),_jsx(_components.td,{children:`Runs a SOCKS5 proxy on your machine and routes any TCP connection through the SSH host`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`127.0.0.1:1080`})})]})]})]}),`\n`,_jsxs(_components.p,{children:[`A rule always goes through a saved host (the `,_jsx(_components.strong,{children:`SSH Host`}),`), using that host’s stored credentials. You don’t need an open terminal tab: YourSSH connects to the host on its own, and through its `,_jsx(_components.a,{href:`/user-guide/hosts`,children:`connection chain`}),` if it has one.`]}),`\n`,_jsx(Heading,{level:`2`,id:`create-a-rule`,children:`Create a rule`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Open the editor`,children:_jsxs(_components.p,{children:[`Go to `,_jsx(_components.strong,{children:`Port Forwarding`}),` and click `,_jsx(_components.strong,{children:`New rule`}),`. The `,_jsx(_components.strong,{children:`New Port Forward Rule`}),` panel opens on the right.`]})}),_jsxs(Step,{title:`Name the rule and pick a type`,children:[_jsxs(_components.p,{children:[`Enter a `,_jsx(_components.strong,{children:`Label`}),`, then choose the `,_jsx(_components.strong,{children:`Type`}),`: `,_jsx(_components.strong,{children:`Local`}),`, `,_jsx(_components.strong,{children:`Remote`}),` or `,_jsx(_components.strong,{children:`Dynamic SOCKS5`}),`.`]}),_jsx(Frame,{caption:`The type menu.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/06-type-menu.png?fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=38a27de3774aa26c9d617ddb5a0e663c`,alt:`Type dropdown with Local, Remote and Dynamic SOCKS5`,\"data-og-width\":`1440`,width:`1440`,\"data-og-height\":`868`,height:`868`,\"data-path\":`images/08-port-forwarding/06-type-menu.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/06-type-menu.png?w=280\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=3543a201d0ac97264d42d8bdc76ae77c 280w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/06-type-menu.png?w=560\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=1c1ec7f300a494e297a5ed126c1ca31d 560w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/06-type-menu.png?w=840\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=5366007aadc44dfd330acf3bc718fc9d 840w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/06-type-menu.png?w=1100\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=75a47d045fcf299a17ce2bdb3aa35bd3 1100w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/06-type-menu.png?w=1650\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=5c7bf16bd8a52ae61585e83bb6a0e08f 1650w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/06-type-menu.png?w=2500\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=ae72a7da0ff5625a3b9d210e8828e332 2500w`})})]}),_jsx(Step,{title:`Set the addresses`,children:_jsxs(_components.p,{children:[`Fill in `,_jsx(_components.strong,{children:`Local Host`}),` and `,_jsx(_components.strong,{children:`Port`}),` (the address that listens on your machine). For `,_jsx(_components.strong,{children:`Local`}),` and `,_jsx(_components.strong,{children:`Remote`}),` rules, also fill in `,_jsx(_components.strong,{children:`Remote Host`}),` and `,_jsx(_components.strong,{children:`Port`}),` for the destination. A `,_jsx(_components.strong,{children:`Dynamic SOCKS5`}),` rule needs only the local address, so the remote fields disappear.`]})}),_jsx(Step,{title:`Choose the SSH host`,children:_jsxs(_components.p,{children:[`Pick the `,_jsx(_components.strong,{children:`SSH Host`}),` the tunnel runs through. The field is marked optional so you can save a draft, but a rule without a host can’t start. It reports `,_jsx(_components.strong,{children:`Select an SSH host first`}),`.`]})}),_jsx(Step,{title:`Optionally auto-start`,children:_jsxs(_components.p,{children:[`Tick `,_jsx(_components.strong,{children:`Auto-start on launch`}),` to bring the tunnel up each time YourSSH starts.`]})}),_jsx(Step,{title:`Save`,children:_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Add Rule`}),`.`]})})]}),`\n`,_jsx(Frame,{caption:`A local rule filled in: localhost port 2200 to port 22 on the remote side, through Demo Server.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/04-local-rule-filled.png?fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=ed951de182ddb91e61dbcf34515850cd`,alt:`New Port Forward Rule panel with a local rule filled in`,\"data-og-width\":`1440`,width:`1440`,\"data-og-height\":`868`,height:`868`,\"data-path\":`images/08-port-forwarding/04-local-rule-filled.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/04-local-rule-filled.png?w=280\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=431a9a000c48d0f3fc9dba2b533f0aab 280w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/04-local-rule-filled.png?w=560\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=0f57375f5f40bcc62203c42fa1063cbe 560w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/04-local-rule-filled.png?w=840\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=392da7bb5abd95dd81c9a6f0383e3499 840w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/04-local-rule-filled.png?w=1100\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=9b711505767b1f56634ea19dd9f822b9 1100w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/04-local-rule-filled.png?w=1650\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=c47fee93da7116a470c4ba976e41d095 1650w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/04-local-rule-filled.png?w=2500\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=7c39986f989b77e9b32576b3e7b87400 2500w`})}),`\n`,_jsx(Frame,{caption:`A dynamic SOCKS5 rule has no remote host or port.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/07-dynamic-rule-filled.png?fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=d805dc5c5ee2155c2ca44aa4e0904c2f`,alt:`New Port Forward Rule panel with Dynamic SOCKS5 selected`,\"data-og-width\":`1440`,width:`1440`,\"data-og-height\":`868`,height:`868`,\"data-path\":`images/08-port-forwarding/07-dynamic-rule-filled.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/07-dynamic-rule-filled.png?w=280\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=1bace5731752d01185b8a69f917cc4bd 280w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/07-dynamic-rule-filled.png?w=560\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=184ce61df49bbca08cbed4dbc0ccbcd0 560w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/07-dynamic-rule-filled.png?w=840\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=ae119eb0787a3707989289b453d3ebf6 840w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/07-dynamic-rule-filled.png?w=1100\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=c6388041349281965c7d94f11336943f 1100w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/07-dynamic-rule-filled.png?w=1650\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=5de83703e199109eec35b0b36bddcf3a 1650w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/07-dynamic-rule-filled.png?w=2500\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=cd80fd8bdc651c9b04911ec937887b36 2500w`})}),`\n`,_jsx(Heading,{level:`3`,id:`validation`,children:`Validation`}),`\n`,_jsx(_components.p,{children:`The editor checks the form when you save:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Label`}),`, `,_jsx(_components.strong,{children:`Local Host`}),` and, for local and remote rules, `,_jsx(_components.strong,{children:`Remote Host`}),` can’t be empty. A missing value shows `,_jsx(_components.strong,{children:`Required`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Each `,_jsx(_components.strong,{children:`Port`}),` must be a number from 1 to 65535. Anything else shows `,_jsx(_components.code,{children:`1–65535`}),` under the field.`]}),`\n`]}),`\n`,_jsx(Frame,{caption:`A port of 70000 is rejected.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/03-validation-port.png?fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=ee8c10ee1897c6ac1c1ccffc9f57c11e`,alt:`Port field highlighted in red with the message 1–65535`,\"data-og-width\":`1440`,width:`1440`,\"data-og-height\":`868`,height:`868`,\"data-path\":`images/08-port-forwarding/03-validation-port.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/03-validation-port.png?w=280\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=3a6162f4c8ee9e4cc2a4f08642860ab0 280w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/03-validation-port.png?w=560\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=39aaf84bd5cca4a4b18a1f3cf5640ba9 560w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/03-validation-port.png?w=840\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=bf78fa827beebfbef38187acec21fa5f 840w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/03-validation-port.png?w=1100\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=62ba8b40956c04dd199fc9a6a9eabe55 1100w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/03-validation-port.png?w=1650\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=4dc51b65af628deafb7dc66ebd7191da 1650w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/03-validation-port.png?w=2500\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=c5a402dc921ade4628279eadb91b2c0c 2500w`})}),`\n`,_jsx(Heading,{level:`2`,id:`start-and-stop`,children:`Start and stop`}),`\n`,_jsx(_components.p,{children:`Each rule has a button on the right: the play button starts it and the stop button stops it. Several tunnels can run at once, and each one is independent.`}),`\n`,_jsx(_components.p,{children:`The status dot on the left shows the state:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Dot`}),_jsx(_components.th,{children:`State`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Grey`}),_jsx(_components.td,{children:`Idle`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Amber`}),_jsxs(_components.td,{children:[`Connecting, or reconnecting (the rule also shows `,_jsx(_components.strong,{children:`reconnecting…`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Green`}),_jsx(_components.td,{children:`Active`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Red`}),_jsx(_components.td,{children:`Error. The message appears under the rule, for example that a port is already in use`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`An active rule shows a live connection count such as `,_jsx(_components.strong,{children:`1 conn`}),`.`]}),`\n`,_jsx(_components.p,{children:`If a rule fails to start, check the message under it. Common causes are a local port already in use, no SSH host selected, or the host no longer existing.`}),`\n`,_jsx(Heading,{level:`2`,id:`auto-reconnect`,children:`Auto-reconnect`}),`\n`,_jsxs(_components.p,{children:[`If the SSH connection drops while a tunnel is running, the rule switches to `,_jsx(_components.strong,{children:`reconnecting…`}),` and YourSSH reconnects with exponential backoff, starting at 2 seconds and doubling up to 30 seconds. Local listeners stay bound while it retries, so clients keep the same local port. Stopping the rule cancels the retry.`]}),`\n`,_jsx(Heading,{level:`2`,id:`edit-duplicate-and-delete`,children:`Edit, duplicate and delete`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Click a rule, or right-click and choose `,_jsx(_components.strong,{children:`Edit`}),`, to change it. The panel title is `,_jsx(_components.strong,{children:`Edit Port Forward Rule`}),` and the button is `,_jsx(_components.strong,{children:`Save`}),`. If the rule is running, stop and start it again to apply the change.`]}),`\n`,_jsxs(_components.li,{children:[`Right-click and choose `,_jsx(_components.strong,{children:`Duplicate`}),` to copy a rule. The copy is named `,_jsx(_components.code,{children:`… (copy)`}),` and never auto-starts.`]}),`\n`,_jsxs(_components.li,{children:[`Hover a rule and click the trash icon, or right-click and choose `,_jsx(_components.strong,{children:`Delete`}),`. YourSSH asks `,_jsx(_components.strong,{children:`Delete rule?`}),` first, naming the label and endpoints, with `,_jsx(_components.strong,{children:`Cancel`}),` selected by default. After you confirm, a running rule is stopped and removed. Deleting a host also stops the tunnels that use it.`]}),`\n`]}),`\n`,_jsx(Frame,{caption:`Clicking a rule opens it in the editor.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/10-rule-editor.png?fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=5e91a20b3a5e07943b2b208aeeeb7605`,alt:`Edit Port Forward Rule panel next to the rule list`,\"data-og-width\":`1440`,width:`1440`,\"data-og-height\":`868`,height:`868`,\"data-path\":`images/08-port-forwarding/10-rule-editor.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/10-rule-editor.png?w=280\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=f5d332c69be3468dff258276a2fa1577 280w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/10-rule-editor.png?w=560\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=008903e0df5aa8676ab56a079c646c84 560w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/10-rule-editor.png?w=840\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=552d6eba215dba39708fa1eb765b0192 840w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/10-rule-editor.png?w=1100\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=c089d958ab1872027feada2a44a0f589 1100w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/10-rule-editor.png?w=1650\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=de7efc96f1ce04d4d1ff8097d278fbca 1650w, https://mintcdn.com/your-ssh/vNM8XA5Zlrh1XSOb/images/08-port-forwarding/10-rule-editor.png?w=2500\u0026fit=max\u0026auto=format\u0026n=vNM8XA5Zlrh1XSOb\u0026q=85\u0026s=9b5502800a2c3d6efdf879bbb0ad1e7d 2500w`})}),`\n`,_jsx(Heading,{level:`2`,id:`example-reach-a-database-on-the-ssh-host`,children:`Example: reach a database on the SSH host`}),`\n`,_jsx(_components.p,{children:`To connect a SQL client to a PostgreSQL server that only listens on the SSH host:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Label`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Postgres`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Type`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Local`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Local Host / Port`}),_jsxs(_components.td,{\"data-numeric\":`true`,children:[_jsx(_components.code,{children:`127.0.0.1`}),` / `,_jsx(_components.code,{children:`5432`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Remote Host / Port`}),_jsxs(_components.td,{\"data-numeric\":`true`,children:[_jsx(_components.code,{children:`127.0.0.1`}),` / `,_jsx(_components.code,{children:`5432`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`SSH Host`}),_jsx(_components.td,{children:`your database host`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Start the rule, then point your client at `,_jsx(_components.code,{children:`127.0.0.1:5432`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`use-tunnels-in-web-tools`,children:`Use tunnels in Web Tools`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Web Tools`}),` plugin has a `,_jsx(_components.strong,{children:`Port Tunnels`}),` tool that works with these forwarded ports, so you can open a tunnelled web service in the in-app browser. See `,_jsx(_components.a,{href:`/user-guide/web-tools`,children:`Web Tools`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`related-pages`,children:`Related pages`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/user-guide/hosts`,children:`Hosts`}),` for saved hosts and connection chains.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/user-guide/sftp`,children:`SFTP`}),` and `,_jsx(_components.a,{href:`/user-guide/terminal`,children:`Terminal`}),` use the same SSH connection settings.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/user-guide/devops`,children:`DevOps Hub`}),` for Cloudflare tunnels and other tunnel tools.`]}),`\n`]})]})}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":{"config":{},"pageMetadata":{"title":"Port forwarding","description":"Create local, remote and dynamic SOCKS5 SSH tunnels, start them on launch and keep them alive.","icon":"arrow-left-right","href":"/user-guide/port-forwarding"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Rule types","slug":"rule-types","depth":2,"children":[]},{"title":"Create a rule","slug":"create-a-rule","depth":2,"children":[{"title":"Validation","slug":"validation","depth":3,"children":[]}]},{"title":"Start and stop","slug":"start-and-stop","depth":2,"children":[]},{"title":"Auto-reconnect","slug":"auto-reconnect","depth":2,"children":[]},{"title":"Edit, duplicate and delete","slug":"edit-duplicate-and-delete","depth":2,"children":[]},{"title":"Example: reach a database on the SSH host","slug":"example-reach-a-database-on-the-ssh-host","depth":2,"children":[]},{"title":"Use tunnels in Web Tools","slug":"use-tunnels-in-web-tools","depth":2,"children":[]},{"title":"Related pages","slug":"related-pages","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"narration":{"path":"user-guide/port-forwarding","locale":"en","estimatedDurationSec":249},"subdomain":"your-ssh","siteName":"YourSSH","title":"Port forwarding - YourSSH","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-13T08:55:04.944Z","originalFileLocation":"user-guide/port-forwarding.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=\"Create local, remote and dynamic SOCKS5 SSH tunnels, start them on launch and keep them alive.\">\u003cmeta data-mint-head name=\"application-name\" content=\"YourSSH\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/your-ssh/nmAMNuFtrlVCA3bb/_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/your-ssh/nmAMNuFtrlVCA3bb/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/your-ssh/nmAMNuFtrlVCA3bb/_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/your-ssh/nmAMNuFtrlVCA3bb/_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/your-ssh/nmAMNuFtrlVCA3bb/_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/your-ssh/nmAMNuFtrlVCA3bb/_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/your-ssh/nmAMNuFtrlVCA3bb/_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/your-ssh/nmAMNuFtrlVCA3bb/_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/your-ssh/nmAMNuFtrlVCA3bb/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Port forwarding - YourSSH\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create local, remote and dynamic SOCKS5 SSH tunnels, start them on launch and keep them alive.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"YourSSH\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://yoursshlabs.com/user-guide/port-forwarding\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://your-ssh.mintlify.site/_mintlify/api/og/v2?division=Connections\u0026amp;title=Port+forwarding\u0026amp;description=Create+local%2C+remote+and+dynamic+SOCKS5+SSH+tunnels%2C+start+them+on+launch+and+keep+them+alive.\u0026amp;theme=65790bf5e932daf838158150\u0026amp;signature=d0e1648b83e3e46f2ba28a4a90211e175e0d7294ea7a2e96a42a738f530517ea\">\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=\"Port forwarding - YourSSH\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create local, remote and dynamic SOCKS5 SSH tunnels, start them on launch and keep them alive.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://your-ssh.mintlify.site/_mintlify/api/og/v2?division=Connections\u0026amp;title=Port+forwarding\u0026amp;description=Create+local%2C+remote+and+dynamic+SOCKS5+SSH+tunnels%2C+start+them+on+launch+and+keep+them+alive.\u0026amp;theme=65790bf5e932daf838158150\u0026amp;signature=d0e1648b83e3e46f2ba28a4a90211e175e0d7294ea7a2e96a42a738f530517ea\">\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/your-ssh/nmAMNuFtrlVCA3bb/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"YourSSH\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#E87C08\">\u003clink data-mint-head rel=\"canonical\" href=\"https://yoursshlabs.com/user-guide/port-forwarding\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/user-guide/port-forwarding.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://yoursshlabs.com/#organization\",\"name\":\"YourSSH\",\"url\":\"https://yoursshlabs.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/your-ssh/hXl_1tpHLWW6nFrV/logo/light.svg?fit=max\u0026auto=format\u0026n=hXl_1tpHLWW6nFrV\u0026q=85\u0026s=af6f8821423df7db3617197a48b29757\"}},{\"@type\":\"WebSite\",\"@id\":\"https://yoursshlabs.com#website\",\"name\":\"YourSSH\",\"url\":\"https://yoursshlabs.com\",\"publisher\":{\"@id\":\"https://yoursshlabs.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://yoursshlabs.com/user-guide/port-forwarding#webpage\",\"url\":\"https://yoursshlabs.com/user-guide/port-forwarding\",\"name\":\"Port forwarding\",\"description\":\"Create local, remote and dynamic SOCKS5 SSH tunnels, start them on launch and keep them alive.\",\"dateModified\":\"2026-11-13T08:55:04.944Z\",\"isPartOf\":{\"@id\":\"https://yoursshlabs.com#website\"},\"breadcrumb\":{\"@id\":\"https://yoursshlabs.com/user-guide/port-forwarding#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://yoursshlabs.com/user-guide/port-forwarding#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Connections\",\"item\":\"https://yoursshlabs.com/user-guide/hosts\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Port forwarding\",\"item\":\"https://yoursshlabs.com/user-guide/port-forwarding\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://yoursshlabs.com/user-guide/port-forwarding#article\",\"headline\":\"Port forwarding\",\"name\":\"Port forwarding\",\"description\":\"Create local, remote and dynamic SOCKS5 SSH tunnels, start them on launch and keep them alive.\",\"url\":\"https://yoursshlabs.com/user-guide/port-forwarding\",\"mainEntityOfPage\":{\"@id\":\"https://yoursshlabs.com/user-guide/port-forwarding#webpage\"},\"dateModified\":\"2026-11-13T08:55:04.944Z\",\"publisher\":{\"@id\":\"https://yoursshlabs.com/#organization\"},\"isPartOf\":{\"@id\":\"https://yoursshlabs.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"YourSSH\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"YourSSH\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/user-guide/port-forwarding.md","siteName":"YourSSH","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/YoursshLabs/yourssh"},{"anchor":"Releases","icon":"download","href":"https://github.com/YoursshLabs/yourssh/releases"}]},"tabs":[{"tab":"User guide","groups":[{"group":"Get started","pages":[{"title":"Introduction","icon":"terminal","href":""},{"title":"Installation","icon":"download","href":"/installation"},{"title":"Quickstart","icon":"rocket","href":"/quickstart"}]},{"group":"Connections","pages":[{"title":"Hosts","icon":"server","href":"/user-guide/hosts"},{"title":"Host keys","icon":"shield-check","href":"/user-guide/host-keys"},{"title":"Terminal","icon":"terminal","href":"/user-guide/terminal"},{"title":"Terminal sharing","icon":"screen-share","href":"/user-guide/terminal-sharing"},{"title":"Bulk actions","description":"Select several hosts to open tabs, run one command everywhere in parallel, or push files to all of them.","icon":"layers","href":"/user-guide/bulk-actions"},{"title":"Port forwarding","icon":"arrow-left-right","href":"/user-guide/port-forwarding"}]},{"group":"Files","pages":[{"title":"SFTP","description":"Browse and transfer files between your computer and remote hosts in a dual-panel file manager.","icon":"folder","href":"/user-guide/sftp"}]},{"group":"Remote desktop","pages":[{"title":"RDP remote desktop","icon":"monitor","href":"/user-guide/rdp"},{"title":"VNC remote desktop","icon":"cast","href":"/user-guide/vnc"}]},{"group":"Security","pages":[{"title":"Keychain and credentials","icon":"key","href":"/user-guide/keychain"},{"title":"Session recording","icon":"video","href":"/user-guide/recording"},{"title":"Audit log","icon":"scroll-text","href":"/user-guide/audit-log"}]},{"group":"Tools","pages":[{"title":"Snippets","icon":"code","href":"/user-guide/snippets"},{"title":"AI assistant","icon":"bot","href":"/user-guide/ai-chat"},{"title":"DevOps Hub","icon":"rocket","href":"/user-guide/devops"},{"title":"Web tools","icon":"wrench","href":"/user-guide/web-tools"},{"title":"Command line and links","icon":"square-terminal","href":"/user-guide/cli"}]},{"group":"Settings and sync","pages":[{"title":"Settings","icon":"settings","href":"/user-guide/settings"},{"title":"Sync and device transfer","icon":"refresh-cw","href":"/user-guide/sync"},{"title":"YourSSH for Android","icon":"smartphone","href":"/user-guide/mobile"}]}]},{"tab":"Developer guide","pages":[{"title":"Developer guide","href":"/developer-guide/architecture"}]},{"tab":"Release notes","pages":[{"title":"Release notes","href":"/release-notes"}]}]},"basePath":"","title":"Port forwarding - YourSSH","buildId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","deploymentId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","dynamics":["2bfc744e19","07c022d89b","a74be98ba7"],"chunks":["NarrationPlayer-D9E2DBwD.js","shallow-BA55zJxQ.js","Frame-1H5zLJUq.js","DynamicMarkdown-RhjEuCHC.js","zoom-image-lightbox-CkI5al_8.js","lightbox-handle-r17bVUz3.js"]}