SSH through shadowsocks?
How could I route my SSH traffic through shadowsocks?
I am connecting from behind the Great Fire Wall to a server using shadowsocks. I would like to make outgoing SSH connections but I am concerned that SSH traffic could be identified and so result in my connection getting shutdown. Hence, I would like to be able to route the SSH traffic through the SOCKS5 proxy that I already have working.
Where do I start to achieve this? I assume I need to create a virtual network adaptor that can present a range of ports from which the output is routed over the SOCKS5 proxy somehow?
ssh shadowsocks
add a comment |
How could I route my SSH traffic through shadowsocks?
I am connecting from behind the Great Fire Wall to a server using shadowsocks. I would like to make outgoing SSH connections but I am concerned that SSH traffic could be identified and so result in my connection getting shutdown. Hence, I would like to be able to route the SSH traffic through the SOCKS5 proxy that I already have working.
Where do I start to achieve this? I assume I need to create a virtual network adaptor that can present a range of ports from which the output is routed over the SOCKS5 proxy somehow?
ssh shadowsocks
add a comment |
How could I route my SSH traffic through shadowsocks?
I am connecting from behind the Great Fire Wall to a server using shadowsocks. I would like to make outgoing SSH connections but I am concerned that SSH traffic could be identified and so result in my connection getting shutdown. Hence, I would like to be able to route the SSH traffic through the SOCKS5 proxy that I already have working.
Where do I start to achieve this? I assume I need to create a virtual network adaptor that can present a range of ports from which the output is routed over the SOCKS5 proxy somehow?
ssh shadowsocks
How could I route my SSH traffic through shadowsocks?
I am connecting from behind the Great Fire Wall to a server using shadowsocks. I would like to make outgoing SSH connections but I am concerned that SSH traffic could be identified and so result in my connection getting shutdown. Hence, I would like to be able to route the SSH traffic through the SOCKS5 proxy that I already have working.
Where do I start to achieve this? I assume I need to create a virtual network adaptor that can present a range of ports from which the output is routed over the SOCKS5 proxy somehow?
ssh shadowsocks
ssh shadowsocks
edited Jan 10 '18 at 9:05
asked Jan 10 '18 at 8:58
Hefaestion
65
65
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
If your configuration of shadowsocks is:
- local address : 127.0.0.1
- local port : 1080
- server ip 42.42.42.42
change for your own configuration
sudo apt install connect-proxy
Edit your ~/.ssh/config
# Outside of the firewall, with HTTPS proxy
Host 42.42.42.42
ProxyCommand connect -H 127.0.0.1:1080 %h 22
## Inside the firewall (do not use proxy)
Host *
ProxyCommand connect %h %p
Now you can try:
ssh username@ipserver
check ip connection
netstat -tn 2>/dev/null
normally you can see something like that
Connexions Internet actives (sans serveurs)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat
tcp 0 68 69.69.69.69:22 42.42.42.42:42800 ESTABLISHED
More skills
Add this script to your ~/.bash_profile.
SOCKS5
export http_proxy=socks5://127.0.0.1:1080
export https_proxy=socks5://127.0.0.1:1080
OR
HTTP(S)
export http_proxy=http://127.0.0.1:1080
export https_proxy=https://127.0.0.1:1080
if you want setup webconnection for your Web browser
Gui way (gnome)
- setting
- network
- proxy server
- enter your configuration
- don't forget to disable proxy for localhost
or just add all proxy redirection to your env
env | grep -i proxy
must be return
HTTP_PROXY=http://127.0.0.1:1080/
FTP_PROXY=http://127.0.0.1:1080/
ALL_PROXY=socks://127.0.0.1:1080/
NO_PROXY=127.0.0.1,localhost
HTTPS_PROXY=http://127.0.0.1:1080/
https_proxy=http://127.0.0.1:1080/
http_proxy=http://127.0.0.1:1080/
no_proxy=127.0.0.1,localhost
all_proxy=socks://127.0.0.1:1080/
ftp_proxy=http://127.0.0.1:1080/
if you just want config curl through shadowsocks
export socks5=socks5://127.0.0.1:1080
and
curl api.ipify.org
For Git
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
I'd like to add a note - if you are doing SSH for a user@my-server ( like when connecting to EC2 in the default way) then replace the server IP with the part at my-server
– tt_Gantz
Oct 17 '18 at 3:01
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f416010%2fssh-through-shadowsocks%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If your configuration of shadowsocks is:
- local address : 127.0.0.1
- local port : 1080
- server ip 42.42.42.42
change for your own configuration
sudo apt install connect-proxy
Edit your ~/.ssh/config
# Outside of the firewall, with HTTPS proxy
Host 42.42.42.42
ProxyCommand connect -H 127.0.0.1:1080 %h 22
## Inside the firewall (do not use proxy)
Host *
ProxyCommand connect %h %p
Now you can try:
ssh username@ipserver
check ip connection
netstat -tn 2>/dev/null
normally you can see something like that
Connexions Internet actives (sans serveurs)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat
tcp 0 68 69.69.69.69:22 42.42.42.42:42800 ESTABLISHED
More skills
Add this script to your ~/.bash_profile.
SOCKS5
export http_proxy=socks5://127.0.0.1:1080
export https_proxy=socks5://127.0.0.1:1080
OR
HTTP(S)
export http_proxy=http://127.0.0.1:1080
export https_proxy=https://127.0.0.1:1080
if you want setup webconnection for your Web browser
Gui way (gnome)
- setting
- network
- proxy server
- enter your configuration
- don't forget to disable proxy for localhost
or just add all proxy redirection to your env
env | grep -i proxy
must be return
HTTP_PROXY=http://127.0.0.1:1080/
FTP_PROXY=http://127.0.0.1:1080/
ALL_PROXY=socks://127.0.0.1:1080/
NO_PROXY=127.0.0.1,localhost
HTTPS_PROXY=http://127.0.0.1:1080/
https_proxy=http://127.0.0.1:1080/
http_proxy=http://127.0.0.1:1080/
no_proxy=127.0.0.1,localhost
all_proxy=socks://127.0.0.1:1080/
ftp_proxy=http://127.0.0.1:1080/
if you just want config curl through shadowsocks
export socks5=socks5://127.0.0.1:1080
and
curl api.ipify.org
For Git
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
I'd like to add a note - if you are doing SSH for a user@my-server ( like when connecting to EC2 in the default way) then replace the server IP with the part at my-server
– tt_Gantz
Oct 17 '18 at 3:01
add a comment |
If your configuration of shadowsocks is:
- local address : 127.0.0.1
- local port : 1080
- server ip 42.42.42.42
change for your own configuration
sudo apt install connect-proxy
Edit your ~/.ssh/config
# Outside of the firewall, with HTTPS proxy
Host 42.42.42.42
ProxyCommand connect -H 127.0.0.1:1080 %h 22
## Inside the firewall (do not use proxy)
Host *
ProxyCommand connect %h %p
Now you can try:
ssh username@ipserver
check ip connection
netstat -tn 2>/dev/null
normally you can see something like that
Connexions Internet actives (sans serveurs)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat
tcp 0 68 69.69.69.69:22 42.42.42.42:42800 ESTABLISHED
More skills
Add this script to your ~/.bash_profile.
SOCKS5
export http_proxy=socks5://127.0.0.1:1080
export https_proxy=socks5://127.0.0.1:1080
OR
HTTP(S)
export http_proxy=http://127.0.0.1:1080
export https_proxy=https://127.0.0.1:1080
if you want setup webconnection for your Web browser
Gui way (gnome)
- setting
- network
- proxy server
- enter your configuration
- don't forget to disable proxy for localhost
or just add all proxy redirection to your env
env | grep -i proxy
must be return
HTTP_PROXY=http://127.0.0.1:1080/
FTP_PROXY=http://127.0.0.1:1080/
ALL_PROXY=socks://127.0.0.1:1080/
NO_PROXY=127.0.0.1,localhost
HTTPS_PROXY=http://127.0.0.1:1080/
https_proxy=http://127.0.0.1:1080/
http_proxy=http://127.0.0.1:1080/
no_proxy=127.0.0.1,localhost
all_proxy=socks://127.0.0.1:1080/
ftp_proxy=http://127.0.0.1:1080/
if you just want config curl through shadowsocks
export socks5=socks5://127.0.0.1:1080
and
curl api.ipify.org
For Git
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
I'd like to add a note - if you are doing SSH for a user@my-server ( like when connecting to EC2 in the default way) then replace the server IP with the part at my-server
– tt_Gantz
Oct 17 '18 at 3:01
add a comment |
If your configuration of shadowsocks is:
- local address : 127.0.0.1
- local port : 1080
- server ip 42.42.42.42
change for your own configuration
sudo apt install connect-proxy
Edit your ~/.ssh/config
# Outside of the firewall, with HTTPS proxy
Host 42.42.42.42
ProxyCommand connect -H 127.0.0.1:1080 %h 22
## Inside the firewall (do not use proxy)
Host *
ProxyCommand connect %h %p
Now you can try:
ssh username@ipserver
check ip connection
netstat -tn 2>/dev/null
normally you can see something like that
Connexions Internet actives (sans serveurs)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat
tcp 0 68 69.69.69.69:22 42.42.42.42:42800 ESTABLISHED
More skills
Add this script to your ~/.bash_profile.
SOCKS5
export http_proxy=socks5://127.0.0.1:1080
export https_proxy=socks5://127.0.0.1:1080
OR
HTTP(S)
export http_proxy=http://127.0.0.1:1080
export https_proxy=https://127.0.0.1:1080
if you want setup webconnection for your Web browser
Gui way (gnome)
- setting
- network
- proxy server
- enter your configuration
- don't forget to disable proxy for localhost
or just add all proxy redirection to your env
env | grep -i proxy
must be return
HTTP_PROXY=http://127.0.0.1:1080/
FTP_PROXY=http://127.0.0.1:1080/
ALL_PROXY=socks://127.0.0.1:1080/
NO_PROXY=127.0.0.1,localhost
HTTPS_PROXY=http://127.0.0.1:1080/
https_proxy=http://127.0.0.1:1080/
http_proxy=http://127.0.0.1:1080/
no_proxy=127.0.0.1,localhost
all_proxy=socks://127.0.0.1:1080/
ftp_proxy=http://127.0.0.1:1080/
if you just want config curl through shadowsocks
export socks5=socks5://127.0.0.1:1080
and
curl api.ipify.org
For Git
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
If your configuration of shadowsocks is:
- local address : 127.0.0.1
- local port : 1080
- server ip 42.42.42.42
change for your own configuration
sudo apt install connect-proxy
Edit your ~/.ssh/config
# Outside of the firewall, with HTTPS proxy
Host 42.42.42.42
ProxyCommand connect -H 127.0.0.1:1080 %h 22
## Inside the firewall (do not use proxy)
Host *
ProxyCommand connect %h %p
Now you can try:
ssh username@ipserver
check ip connection
netstat -tn 2>/dev/null
normally you can see something like that
Connexions Internet actives (sans serveurs)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat
tcp 0 68 69.69.69.69:22 42.42.42.42:42800 ESTABLISHED
More skills
Add this script to your ~/.bash_profile.
SOCKS5
export http_proxy=socks5://127.0.0.1:1080
export https_proxy=socks5://127.0.0.1:1080
OR
HTTP(S)
export http_proxy=http://127.0.0.1:1080
export https_proxy=https://127.0.0.1:1080
if you want setup webconnection for your Web browser
Gui way (gnome)
- setting
- network
- proxy server
- enter your configuration
- don't forget to disable proxy for localhost
or just add all proxy redirection to your env
env | grep -i proxy
must be return
HTTP_PROXY=http://127.0.0.1:1080/
FTP_PROXY=http://127.0.0.1:1080/
ALL_PROXY=socks://127.0.0.1:1080/
NO_PROXY=127.0.0.1,localhost
HTTPS_PROXY=http://127.0.0.1:1080/
https_proxy=http://127.0.0.1:1080/
http_proxy=http://127.0.0.1:1080/
no_proxy=127.0.0.1,localhost
all_proxy=socks://127.0.0.1:1080/
ftp_proxy=http://127.0.0.1:1080/
if you just want config curl through shadowsocks
export socks5=socks5://127.0.0.1:1080
and
curl api.ipify.org
For Git
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
edited Apr 5 '18 at 19:20
answered Apr 5 '18 at 16:50
Barre_k
413
413
I'd like to add a note - if you are doing SSH for a user@my-server ( like when connecting to EC2 in the default way) then replace the server IP with the part at my-server
– tt_Gantz
Oct 17 '18 at 3:01
add a comment |
I'd like to add a note - if you are doing SSH for a user@my-server ( like when connecting to EC2 in the default way) then replace the server IP with the part at my-server
– tt_Gantz
Oct 17 '18 at 3:01
I'd like to add a note - if you are doing SSH for a user@my-server ( like when connecting to EC2 in the default way) then replace the server IP with the part at my-server
– tt_Gantz
Oct 17 '18 at 3:01
I'd like to add a note - if you are doing SSH for a user@my-server ( like when connecting to EC2 in the default way) then replace the server IP with the part at my-server
– tt_Gantz
Oct 17 '18 at 3:01
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f416010%2fssh-through-shadowsocks%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown