美文网首页
通过代理连接ssh

通过代理连接ssh

作者: zxqian1991 | 来源:发表于2017-03-01 15:49 被阅读152次

主要参考该篇文章,为了防止文章丢失,转载至此。

注意
在进行./configure时在MAC下可能会错误,这个在别的教程中几乎没有提及,这里的做法是:

./configure --host=apple

Tunnel SSH through a proxy on MacOS X Mountain Lion

Until recently my workplace allowed direct ssh traffic to pretty much anywhere. They recently blocked this, which makes sense from a security point of view but is very inconvenient at times. Luckily it is pretty easy to tunnel ssh through our http proxy so I can still get to external hosts and they can still monitor what I am doing. The first step is to install Xcode if you haven't already. In Mountain Lion, Xcode is now available through the Mac App Store. After you've installed Xcode, you'll need to install the command line tools. Launch Xcode and go to Preferences > Downloads to install the command line tools.
Next, download corkscrew. The corkscrew README has more or less everything you need to know from here, but the basic procedure is to launch Terminal and then enter the following commands:

cd ~/Downloads
tar -xfv corkscrew-2.0.tar
cd corkscrew-2.0
./configure --host=apple

The configure command is the only part that varies from the README. Without specifying the host I was getting an error "configure: error: can not guess host type; you must specify one". After configure is done, then run two more commands.

make
sudo make install

Next you will need to create the file ~/.ssh/config if it doesn't already exist and add the following lines, where proxy.example.com is your proxy server and 8080 is the port it is listening on:

ProxyCommand /usr/local/bin/corkscrew proxy.example.com 8080 %h %p

If your proxy requires authentication like mine then you need to modify your ~/.ssh/config slightly.

Host *
  ProxyCommand corkscrew proxy.com 8888 %h %p

相关文章

  • 通过代理连接ssh

    主要参考该篇文章,为了防止文章丢失,转载至此。 注意在进行./configure时在MAC下可能会错误,这个在别的...

  • ssh ProxyJump 通过代理机跳转内网

    ssh 通过代理机跳转内网 ssh 命令有一种简单的方法来利用跳板主机通过单个命令连接到远程主机。 ssh 可以使...

  • SSH 代理连接

    OpenSSH connection via proxy Command line for proxy 用很长的命...

  • cmder远程登录

    通过 SSH 口令方式连接 通过 SSH 密钥方式连接 生成密钥文件 输入 ssh-keygen -t rsa 按...

  • SSH 通过代理连接服务器

    老规矩,先说结论: 或者: 一、背景 有些时候,由于网络限制等原因,不能直接连通过 SSH 连到指定服务器,需要经...

  • Linux知识积累

    SSH连接 ssh通过跳板机连接内网服务器,发现能ping通连接不上,检查了/etc /ssh/ssh_confi...

  • 阿里云集群部署fabric网络:总结

    如何通过SSH连接到Kubenetes集群? 我们通过SSH只能连接到Master节点的公网IP。并通过root用...

  • 利用反向代理实现内网的ssh连接

    内容实现了再补 参考文章:SSH如何反向代理稳定穿透内网利用ssh反向代理以及autossh实现从外网连接内网服务器

  • GIT相关

    一些用法 ssh配置代理 如果电脑联网需要走代理,然后发现git使用ssh协议无法连接到github,这里以win...

  • autossh实现内网穿透

    autossh作用实现内网穿透,之前用过ssh反向代理,但是ssh反向代理在网络不稳定的环境下面就会很麻烦,连接断...

网友评论

      本文标题:通过代理连接ssh

      本文链接:https://www.haomeiwen.com/subject/yatcgttx.html