



#设置代理,详细地址见“共享服务器常见问题”文档Q43
export http_proxy="http://xx.xx.xx.216:7xxx"
export https_proxy="http://xx.xx.xx.216:7xxx"
export all_proxy="socks5://xx.xx.xx.216:7xxx"
#如果要取消代理,则可以执行
unset http_proxy
unset https_proxy
unset all_proxy
unset HTTP_PROXY
unset HTTPS_PROXY
unset ALL_PROXY
#验证,如果没有任何输出,说明已经恢复干净
env | grep -i proxy
nano ~/.ssh/environment
#写入
http_proxy="http://xx.xx.xx.216:7xxx"
https_proxy="http://xx.xx.xx.216:7xxx"
#编辑 sshd 配置:
sudo nano /etc/ssh/sshd_config
#找到这一行(没有就加)
PermitUserEnvironment yes
#重启 ssh
sudo systemctl restart ssh原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。