首先安装proxychains
apt-get install sudo
sudo apt install proxychains
其次修改服务器配置
编辑vim /etc/proxychains.conf文件,将最后一行(对应的部分为ProxyList)改为“socks5 127.0.0.1 33333”,33333可设置为自己想要的端口
在本机上用ssh连接服务器
不需要访问github|huggingface等:
ssh -R 127.0.0.1:33333 root@[服务器地址] -p