Add proxychains4 to the front of every command, e.g.Config /usr/local/Cellar/proxychains-ng/4.7/etc/nf, modify the following parameters.Install proxychains-ng by running brew install proxychains-ng.Socks 5 in Terminal Using Proxychains-ng to socksify your command how-do-i-set-up-a-linux-proxy-for-my-mac by askubuntu.Ssh -ND 1080 -i ~/.ssh/hello.pem -p 22 Reference # `-N`: do not execute commands # `-D`: bind 1080 port and forward 1080 port to 22 port # `-i`: use pre-shared key `hello.pem` # `-p`: specify port used to connect to remote server