ssh通过http代理访问服务器
2016-08-01 17:22
483 查看
centos 7,root user
Host *
ProxyCommand corkscrew http-proxy.example.com 8080 %h %p
… replacing http-proxy.example.com with the name or address of your http proxy and possibly replacing 8080 with the port on which the proxy listens, which may be 80 or even some other port. The %h and %p will be replaced automatically by SSH with the actual destination host and port.
These two lines tell the SSH client to start another program (corkscrew) to make the actual connection to the SSH server. The Host * line says that this will be done for ALL hosts. If you wish to restrict the hosts for which this will be done, you can put a limited form of regular expression there. See the ssh_config(5) man page for more information. If you don’t have corkscrew in your path or have put it in a non-standard location, you may specify an absolute path to corkscrew in that file as well.
scp -P port -r ./test username@ip:/home/test/
install:Get Corkscrew
download: https://pkgs.org/download/corkscrewAdd ProxyCommand to your SSH config file:
You may or may not have a configuration file for SSH already. It should be located in $HOME/.ssh/config and is a simple text file. Create one if it does not exist and add lines such as these to it:Host *
ProxyCommand corkscrew http-proxy.example.com 8080 %h %p
… replacing http-proxy.example.com with the name or address of your http proxy and possibly replacing 8080 with the port on which the proxy listens, which may be 80 or even some other port. The %h and %p will be replaced automatically by SSH with the actual destination host and port.
These two lines tell the SSH client to start another program (corkscrew) to make the actual connection to the SSH server. The Host * line says that this will be done for ALL hosts. If you wish to restrict the hosts for which this will be done, you can put a limited form of regular expression there. See the ssh_config(5) man page for more information. If you don’t have corkscrew in your path or have put it in a non-standard location, you may specify an absolute path to corkscrew in that file as well.
example
ssh username@ip -p portscp -P port -r ./test username@ip:/home/test/
from:
https://www.mtu.net/~engstrom/ssh-proxy.php相关文章推荐
- HttpClient4基础2--通过认证代理访问网页
- 通过配置ASA穿越代理加强企业内部访问服务器安全
- ssh 使用新法:公网(合法 ip)用户访问内网(私有 ip)服务器(http,ftp,sshd,cvs...),内网的朋友不妨一看。
- 3.18 通过http访问服务器
- 通过http访问svn服务器的配置方法 .
- HttpClient4基础1--通过匿名代理访问网页
- HttpClient4基础2--通过认证代理访问网页
- Android通过HttpClient访问服务器的servlet
- Android 通过http访问服务器
- 搭建通过 ssh 访问的 Git 服务器
- 通过http访问svn服务器的配置方法
- HttpClient4基础2--通过认证代理访问网页
- 采用HTTPClient通过代理连接服务器
- Eclipse 通过代理访问SVN服务器
- ssh 使用新法公网(合法 ip)用户访问内网(私有 ip)服务器(http,ftp,sshd,cvs...),内网的朋友不妨一看[zt]
- java通过代理访问http
- 通过SSH代理访问国外网站
- HttpClient4基础1--通过匿名代理访问网页
- 通过设置代理,解决服务器禁止抓取,报“java.io.IOException: Server returned HTTP response code: 403 for URL”错误的方法
- Android 通过http访问服务器