15
Mac让ssh通过代理来连接服务器
source link: https://www.pkslow.com/archives/mac-ssh-proxy
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Mac让ssh通过代理来连接服务器 | 南瓜慢说官方网站技术之前,先读诗书:
如果我们在家办公,就需要通过代理来连接公司内网的服务器。当然,还有其它场景也可能是需要通过代理来ssh
连接的。
连接命令如下:
ssh -o "ProxyCommand=nc -X 5 -x 代理服务器:代理端口 %h %p" 用户名@远程服务器
ssh -o "ProxyCommand=nc -X 5 -x 127.0.0.1:1086 %h %p" [email protected]
为了方便,我们可以定义一个别名:
alias sshProxy='ssh -o "ProxyCommand=nc -X 5 -x 127.0.0.1:1086 %h %p"'
这样,只要使用以下名字即可:
sshProxy [email protected]
参考:connect-with-ssh-through-a-proxy
欢迎关注微信公众号<南瓜慢说>,将持续为你更新...
推荐阅读:
如何制定切实可行的计划并好好执行
容器技术(Docker-Kubernetes)
SpringBoot-Cloud相关
Https专题
- 本文作者: 南瓜慢说
- 本文链接: https://www.pkslow.com/archives/mac-ssh-proxy
- 版权声明: 本博客所有文章除特别声明外,不可转载!
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK