Last active
August 29, 2015 14:19
-
-
Save wgm89/fde00a0f6e9081bc04e4 to your computer and use it in GitHub Desktop.
ssh socket proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export SOCKS5_SERVER=124.251.13.148:40800 | |
export SOCKS5_USER=php | |
export SOCKS5_PASSWORD=php@syswin2015 | |
ssh php@172.20.1.159 | |
Host 172.20.1.159 | |
ProxyCommand connect-proxy -5 -S 124.251.13.148:40800 %h %p | |
########################################################################### | |
#!/bin/bash | |
SOCKS5_SERVER=office-proxy.example.com:8881 | |
SOCKS5_USER=MyUserID | |
SOCKS5_PASSWORD=BAD_PassWorD | |
identity=PersonalRemoteUser | |
keyfile=$HOME/.ssh/$identity | |
remote_system=myvps.vpskloud.com | |
export SOCKS5_SERVER SOCKS5_USER SOCKS5_PASSWORD | |
ssh -i $keyfile -o ProxyCommand=" connect-proxy -s %h %p" ${identity}@${remote_system} 2>/dev/null | |
Host test | |
HostName 172.28.6.38 | |
User syswin | |
Host production | |
HostName 172.20.1.159 | |
User php | |
ProxyCommand connect-proxy -5 -S 124.251.13.148:40800 %h %p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment