debian系统通过corkscrew代理软件进行ssh代理和centos系统通过connect-proxy设置ssh代理

debian系统通过corkscrew代理软件进行ssh代理


虚拟机通过台式机上的ccproxy代理上网,安装软件什么的没有问题,后面ssh的时候没办法代理

export ftp_proxy=http://10.11.0.148:808
export socks_proxy="socks://10.11.0.148:1888/"
export http_proxy=http://10.11.0.148:808
export https_proxy=https://10.11.0.148:808


# 可以设置代理通过http的代理进行ssh连接,ssh代理端口是808
# 安装代理软件 apt-get install corkscrew

root@jenkins-6d657f7996-m8t8m:/# more ~/.ssh/config
Host *
    ProxyCommand corkscrew 10.11.0.148 808 %h %p

echo "Host *"> ~/.ssh/config
echo "    ProxyCommand /usr/bin/corkscrew 10.11.0.148 1888 %h %p" >> ~/.ssh/config

 

 

 

 

centos中设置ssh通过http代理

# 安装代理工具
# yum install -y connect-proxy

# 配置代理
[root@server01 ~]# vim ~/.ssh/config
Host gitee.com *.gitee.com
    ProxyCommand connect-proxy -H 10.11.0.148:808 %h %p

posted @ 2020-09-25 16:57  reblue520  阅读(512)  评论(0编辑  收藏  举报