You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# set http proxyexport http_proxy=http://127.0.0.1:8080
# set http proxy with user and passwordexport http_proxy=http://USERNAME:[email protected]:8080
# set http proxy with user and password (with special characters)export http_proxy=http://`urlencode 'USERNAME'`:`urlencode 'PASSWORD'`@127.0.0.1:8080
# set socks proxy (local DNS)export http_proxy=socks5://127.0.0.1:1080
# set socks proxy (remote DNS)export http_proxy=socks5h://127.0.0.1:1080
# use 'nc' with http protocolexport ssh_proxy='ProxyCommand=nc -X connect -x PROXYHOST:PROXYPORT %h %p'# use 'nc' with socks5 protocolexport ssh_proxy='ProxyCommand=nc -X 5 -x PROXYHOST:PROXYPORT %h %p'# use 'connect' with http protocolexport ssh_proxy='ProxyCommand=connect -H PROXYHOST:PROXYPORT %h %p'# use 'connect' with socks5 protocolexport ssh_proxy='ProxyCommand=connect -S PROXYHOST:PROXYPORT %h %p'# connect to ssh server over proxy
ssh -o "$ssh_proxy" USER@FINAL_DEST
set no proxy to ignore private network address
no_proxy="127.0.0.1,localhost,.localdomain.com"
no_proxy=$no_proxy,`echo 10.{0..255}.{0..255}.{0..255}|tr ''','`
no_proxy=$no_proxy,`echo 172.{16..31}.{0..255}.{0..255}|tr ''','`
no_proxy=$no_proxy,`echo 192.168.{0..255}.{0..255}|tr ''','`export no_proxy
# for more private network addresses, check following url# https://segmentfault.com/q/1010000010521593# https://en.wikipedia.org/wiki/Private_network