René's URL Explorer Experiment


Title: ssh 隧道 · Issue #129 · codcodog/Blog · GitHub

Open Graph Title: ssh 隧道 · Issue #129 · codcodog/Blog

X Title: ssh 隧道 · Issue #129 · codcodog/Blog

Description: ssh 隧道 ssh 隧道,或者叫 ssh 端口转发,主要有三种类型: 本地端口转发 远程端口转发 动态端口转发 本地端口转发 本地端口转发可以将本地(ssh 客户端)计算机上的端口请求转发到服务器端(ssh 服务端), 再由服务器端转发到目标机器的端口上. ssh -L [LOCAL_IP:]LOCAL_PORT:DESTINATION:DESTINATION_PORT [USER@]SSH_SERVER 远程端口转发 远程端口转发与本地端口转发相反,是将 ssh 服...

Open Graph Description: ssh 隧道 ssh 隧道,或者叫 ssh 端口转发,主要有三种类型: 本地端口转发 远程端口转发 动态端口转发 本地端口转发 本地端口转发可以将本地(ssh 客户端)计算机上的端口请求转发到服务器端(ssh 服务端), 再由服务器端转发到目标机器的端口上. ssh -L [LOCAL_IP:]LOCAL_PORT:DESTINATION:DESTINATION_PORT [USER@]SS...

X Description: ssh 隧道 ssh 隧道,或者叫 ssh 端口转发,主要有三种类型: 本地端口转发 远程端口转发 动态端口转发 本地端口转发 本地端口转发可以将本地(ssh 客户端)计算机上的端口请求转发到服务器端(ssh 服务端), 再由服务器端转发到目标机器的端口上. ssh -L [LOCAL_IP:]LOCAL_PORT:DESTINATION:DESTINATION_PORT [USER@]SS...

Opengraph URL: https://github.com/codcodog/Blog/issues/129

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ssh 隧道","articleBody":"ssh 隧道\r\n=========\r\n\r\n`ssh` 隧道,或者叫 `ssh` 端口转发,主要有三种类型:\r\n- 本地端口转发\r\n- 远程端口转发\r\n- 动态端口转发\r\n\r\n\r\n### 本地端口转发\r\n\r\n本地端口转发可以将本地(`ssh` 客户端)计算机上的端口请求转发到服务器端(`ssh` 服务端),  \r\n再由服务器端转发到目标机器的端口上.\r\n\r\n```\r\nssh -L [LOCAL_IP:]LOCAL_PORT:DESTINATION:DESTINATION_PORT [USER@]SSH_SERVER\r\n```\r\n\r\n\r\n### 远程端口转发\r\n\r\n远程端口转发与本地端口转发相反,是将 `ssh` 服务器端侦听的端口请求转发到本地(`ssh` 客户端)计算机,  \r\n再由本地计算机转发到目标机器的端口上.\r\n\r\n```\r\nssh -R [REMOTE:]REMOTE_PORT:DESTINATION:DESTINATION_PORT [USER@]SSH_SERVER\r\n```\r\n\r\n\r\n### 动态端口转发\r\n\r\n动态端口转发可以充当一个简单的 `socks` 代理服务器.  \r\n当客户端连接到该端口时,连接将转发到服务器端(`ssh` 服务端),再由服务器端转发到目标计算机上的端口.\r\n\r\n```\r\nssh -D [LOCAL_IP:]LOCAL_PORT [USER@]SSH_SERVER\r\n```\r\n\r\n例如,在端口 `1080` 创建 `socks` 隧道,再配置好 `SwitchyOmega`,就可以愉快地爬梯子了.\r\n```\r\n$ ssh -D 1080 -N -f user@server\r\n```\r\n\u003e -N 不要执行远程命令  \r\n\u003e -f ssh 命令后台运行\r\n\r\n\r\n### 应用场景\r\n\r\n有 A, B, C 三台服务器,其中 A, C 网络不通,而 A, B 可以连接,B, C 网络也可以连接.\r\n\r\n在 A 服务器上有个程序 a\r\n```\r\n$ curl localhost:8080/a\r\nHello World.\r\n```\r\n\r\n若要 C 服务器也能访问 A 服务上的程序 a,则需要通过 B 服务器进行中转.\r\n\r\n在 A 服务器上进行远程端口转发\r\n```\r\n$ ssh -R 8080:127.0.0.1:8080 -N -f root@B\r\n```\r\n这个命令就是将 B 服务器上 8080 端口的请求转发到 A 服务器上,然后 A 再转发到 `127.0.0.1:8080`.\r\n\r\n这样 C 通过 B 服务器就可以访问到 A 上的程序 a 了\r\n```\r\n$ curl http://B:8080/a\r\nHello World.\r\n```\r\n\r\n**注意**  \r\n若端口转发失败,则 `ssh` 服务器端 `/etc/ssh/sshd_config` 需要配置 `GatewayPorts` 为 `yes`,再重启 `ssh`\r\n```\r\n$ systemctl restart sshd.service\r\n```\r\n\r\n### 参考\r\n[如何设置SSH隧道](https://www.myfreax.com/how-to-setup-ssh-tunneling/)\r\n","author":{"url":"https://github.com/codcodog","@type":"Person","name":"codcodog"},"datePublished":"2021-05-08T15:23:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/129/Blog/issues/129"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c612102c-f768-3a71-06c5-8faadfce3aee
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8C78:3F11E1:A87390:E4285E:6A4C4CFD
html-safe-nonce34f0d52e59201971217084a459cba4cad96cde942d2b83df5e973ca24a7732a5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Qzc4OjNGMTFFMTpBODczOTA6RTQyODVFOjZBNEM0Q0ZEIiwidmlzaXRvcl9pZCI6IjYzMDgxNDY3NzI5NzY2MTg3NDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacfc5bee984e0a6c9be109302937d41f0a65395a0f44d60e91511266a5a8ab4c4e
hovercard-subject-tagissue:880950498
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/codcodog/Blog/129/issue_layout
twitter:imagehttps://opengraph.githubassets.com/48e1a6834d50cfdfd40daab1fab655b1820148dea425ce10600040d53664d2fe/codcodog/Blog/issues/129
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/48e1a6834d50cfdfd40daab1fab655b1820148dea425ce10600040d53664d2fe/codcodog/Blog/issues/129
og:image:altssh 隧道 ssh 隧道,或者叫 ssh 端口转发,主要有三种类型: 本地端口转发 远程端口转发 动态端口转发 本地端口转发 本地端口转发可以将本地(ssh 客户端)计算机上的端口请求转发到服务器端(ssh 服务端), 再由服务器端转发到目标机器的端口上. ssh -L [LOCAL_IP:]LOCAL_PORT:DESTINATION:DESTINATION_PORT [USER@]SS...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecodcodog
hostnamegithub.com
expected-hostnamegithub.com
None3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c
turbo-cache-controlno-preview
go-importgithub.com/codcodog/Blog git https://github.com/codcodog/Blog.git
octolytics-dimension-user_id18098145
octolytics-dimension-user_logincodcodog
octolytics-dimension-repository_id75478736
octolytics-dimension-repository_nwocodcodog/Blog
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id75478736
octolytics-dimension-repository_network_root_nwocodcodog/Blog
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release65d78903193f110d7a9d1f8587c6dc3cb911aae0
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/codcodog/Blog/issues/129#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcodcodog%2FBlog%2Fissues%2F129
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcodcodog%2FBlog%2Fissues%2F129
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=codcodog%2FBlog
Reloadhttps://github.com/codcodog/Blog/issues/129
Reloadhttps://github.com/codcodog/Blog/issues/129
Reloadhttps://github.com/codcodog/Blog/issues/129
codcodog https://github.com/codcodog
Bloghttps://github.com/codcodog/Blog
Notifications https://github.com/login?return_to=%2Fcodcodog%2FBlog
Fork 1 https://github.com/login?return_to=%2Fcodcodog%2FBlog
Star 20 https://github.com/login?return_to=%2Fcodcodog%2FBlog
Code https://github.com/codcodog/Blog
Issues 135 https://github.com/codcodog/Blog/issues
Pull requests 0 https://github.com/codcodog/Blog/pulls
Actions https://github.com/codcodog/Blog/actions
Wiki https://github.com/codcodog/Blog/wiki
Security and quality 0 https://github.com/codcodog/Blog/security
Insights https://github.com/codcodog/Blog/pulse
Code https://github.com/codcodog/Blog
Issues https://github.com/codcodog/Blog/issues
Pull requests https://github.com/codcodog/Blog/pulls
Actions https://github.com/codcodog/Blog/actions
Wiki https://github.com/codcodog/Blog/wiki
Security and quality https://github.com/codcodog/Blog/security
Insights https://github.com/codcodog/Blog/pulse
ssh 隧道https://github.com/codcodog/Blog/issues/129#top
sshhttps://github.com/codcodog/Blog/issues?q=state%3Aopen%20label%3A%22ssh%22
https://github.com/codcodog
codcodoghttps://github.com/codcodog
on May 8, 2021https://github.com/codcodog/Blog/issues/129#issue-880950498
如何设置SSH隧道https://www.myfreax.com/how-to-setup-ssh-tunneling/
sshhttps://github.com/codcodog/Blog/issues?q=state%3Aopen%20label%3A%22ssh%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.