Is it possible to redirect ssh traffic (not forward), How?
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I am aware that it is possible to forward SSH from server A to server B by creating a tunnel.
What I am asking for is rather the red alternative on the schema above.
Can this scenario be implemented:
- SSH to server A
- Server A tells client to go to server B instead
- Server B communicates directly with client over SSH
So basically a sort of proxy that after introducing the client-server to each other, he gets out of the communication.
I imagine using a firewall redirection doesn't offer much customization.
What I seek ultimately is a way to make access through SSH to git mirrors transparent for client depending on geolocation.
Advanced scenario scenario
- Client Pulling from server A and is closer to server B is redirected to B
- When pushing, client remains on server A
ssh git proxy geolocation
add a comment |Â
up vote
2
down vote
favorite
I am aware that it is possible to forward SSH from server A to server B by creating a tunnel.
What I am asking for is rather the red alternative on the schema above.
Can this scenario be implemented:
- SSH to server A
- Server A tells client to go to server B instead
- Server B communicates directly with client over SSH
So basically a sort of proxy that after introducing the client-server to each other, he gets out of the communication.
I imagine using a firewall redirection doesn't offer much customization.
What I seek ultimately is a way to make access through SSH to git mirrors transparent for client depending on geolocation.
Advanced scenario scenario
- Client Pulling from server A and is closer to server B is redirected to B
- When pushing, client remains on server A
ssh git proxy geolocation
Like a redirection rule in a firewall on Server A?
â Kusalananda
Jun 21 at 9:46
I don't think this is offered by the standard ssh tools.
â Tomasz
Jun 21 at 11:52
I'd rather try to use HTTP instead of SSH.
â Tomasz
Jun 21 at 11:54
@Tomasz it has to be over SSH
â Ezwig
Jun 21 at 12:28
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I am aware that it is possible to forward SSH from server A to server B by creating a tunnel.
What I am asking for is rather the red alternative on the schema above.
Can this scenario be implemented:
- SSH to server A
- Server A tells client to go to server B instead
- Server B communicates directly with client over SSH
So basically a sort of proxy that after introducing the client-server to each other, he gets out of the communication.
I imagine using a firewall redirection doesn't offer much customization.
What I seek ultimately is a way to make access through SSH to git mirrors transparent for client depending on geolocation.
Advanced scenario scenario
- Client Pulling from server A and is closer to server B is redirected to B
- When pushing, client remains on server A
ssh git proxy geolocation
I am aware that it is possible to forward SSH from server A to server B by creating a tunnel.
What I am asking for is rather the red alternative on the schema above.
Can this scenario be implemented:
- SSH to server A
- Server A tells client to go to server B instead
- Server B communicates directly with client over SSH
So basically a sort of proxy that after introducing the client-server to each other, he gets out of the communication.
I imagine using a firewall redirection doesn't offer much customization.
What I seek ultimately is a way to make access through SSH to git mirrors transparent for client depending on geolocation.
Advanced scenario scenario
- Client Pulling from server A and is closer to server B is redirected to B
- When pushing, client remains on server A
ssh git proxy geolocation
edited Jun 21 at 10:54
Jeff Schaller
30.8k846104
30.8k846104
asked Jun 21 at 9:41
Ezwig
320212
320212
Like a redirection rule in a firewall on Server A?
â Kusalananda
Jun 21 at 9:46
I don't think this is offered by the standard ssh tools.
â Tomasz
Jun 21 at 11:52
I'd rather try to use HTTP instead of SSH.
â Tomasz
Jun 21 at 11:54
@Tomasz it has to be over SSH
â Ezwig
Jun 21 at 12:28
add a comment |Â
Like a redirection rule in a firewall on Server A?
â Kusalananda
Jun 21 at 9:46
I don't think this is offered by the standard ssh tools.
â Tomasz
Jun 21 at 11:52
I'd rather try to use HTTP instead of SSH.
â Tomasz
Jun 21 at 11:54
@Tomasz it has to be over SSH
â Ezwig
Jun 21 at 12:28
Like a redirection rule in a firewall on Server A?
â Kusalananda
Jun 21 at 9:46
Like a redirection rule in a firewall on Server A?
â Kusalananda
Jun 21 at 9:46
I don't think this is offered by the standard ssh tools.
â Tomasz
Jun 21 at 11:52
I don't think this is offered by the standard ssh tools.
â Tomasz
Jun 21 at 11:52
I'd rather try to use HTTP instead of SSH.
â Tomasz
Jun 21 at 11:54
I'd rather try to use HTTP instead of SSH.
â Tomasz
Jun 21 at 11:54
@Tomasz it has to be over SSH
â Ezwig
Jun 21 at 12:28
@Tomasz it has to be over SSH
â Ezwig
Jun 21 at 12:28
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
Unfortunately there is no flag to turn on in SSH to do this. You'd have to code something custom for GIT. (i.e. if serverA has lower ping time than server B use A or vice vera)
The target, is to achieve a setup that is transparent for clients. If i will be doing a customization, i would want it to be on server side
â Ezwig
Jun 21 at 13:27
add a comment |Â
up vote
1
down vote
You can think of this kind of wrapping:
- servers, or just the main server holds a git transfer initialisation script
- in the clients, define Git aliases that will get the target server by executing that script on the main server (or any of the servers)
If you only need to redirect pull
, then you need one alias. But probably you'll also want to redirect fetch
(if not more commands, I'm not that good with Git).
I thought about that. The constraint is that client should be agnostic to the change. I was hoping for soething similar to http redirect. Like apache mod_rewrite for http but for ssh.
â Ezwig
Jun 21 at 13:22
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Unfortunately there is no flag to turn on in SSH to do this. You'd have to code something custom for GIT. (i.e. if serverA has lower ping time than server B use A or vice vera)
The target, is to achieve a setup that is transparent for clients. If i will be doing a customization, i would want it to be on server side
â Ezwig
Jun 21 at 13:27
add a comment |Â
up vote
1
down vote
accepted
Unfortunately there is no flag to turn on in SSH to do this. You'd have to code something custom for GIT. (i.e. if serverA has lower ping time than server B use A or vice vera)
The target, is to achieve a setup that is transparent for clients. If i will be doing a customization, i would want it to be on server side
â Ezwig
Jun 21 at 13:27
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Unfortunately there is no flag to turn on in SSH to do this. You'd have to code something custom for GIT. (i.e. if serverA has lower ping time than server B use A or vice vera)
Unfortunately there is no flag to turn on in SSH to do this. You'd have to code something custom for GIT. (i.e. if serverA has lower ping time than server B use A or vice vera)
answered Jun 21 at 13:11
Joe M
5964
5964
The target, is to achieve a setup that is transparent for clients. If i will be doing a customization, i would want it to be on server side
â Ezwig
Jun 21 at 13:27
add a comment |Â
The target, is to achieve a setup that is transparent for clients. If i will be doing a customization, i would want it to be on server side
â Ezwig
Jun 21 at 13:27
The target, is to achieve a setup that is transparent for clients. If i will be doing a customization, i would want it to be on server side
â Ezwig
Jun 21 at 13:27
The target, is to achieve a setup that is transparent for clients. If i will be doing a customization, i would want it to be on server side
â Ezwig
Jun 21 at 13:27
add a comment |Â
up vote
1
down vote
You can think of this kind of wrapping:
- servers, or just the main server holds a git transfer initialisation script
- in the clients, define Git aliases that will get the target server by executing that script on the main server (or any of the servers)
If you only need to redirect pull
, then you need one alias. But probably you'll also want to redirect fetch
(if not more commands, I'm not that good with Git).
I thought about that. The constraint is that client should be agnostic to the change. I was hoping for soething similar to http redirect. Like apache mod_rewrite for http but for ssh.
â Ezwig
Jun 21 at 13:22
add a comment |Â
up vote
1
down vote
You can think of this kind of wrapping:
- servers, or just the main server holds a git transfer initialisation script
- in the clients, define Git aliases that will get the target server by executing that script on the main server (or any of the servers)
If you only need to redirect pull
, then you need one alias. But probably you'll also want to redirect fetch
(if not more commands, I'm not that good with Git).
I thought about that. The constraint is that client should be agnostic to the change. I was hoping for soething similar to http redirect. Like apache mod_rewrite for http but for ssh.
â Ezwig
Jun 21 at 13:22
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You can think of this kind of wrapping:
- servers, or just the main server holds a git transfer initialisation script
- in the clients, define Git aliases that will get the target server by executing that script on the main server (or any of the servers)
If you only need to redirect pull
, then you need one alias. But probably you'll also want to redirect fetch
(if not more commands, I'm not that good with Git).
You can think of this kind of wrapping:
- servers, or just the main server holds a git transfer initialisation script
- in the clients, define Git aliases that will get the target server by executing that script on the main server (or any of the servers)
If you only need to redirect pull
, then you need one alias. But probably you'll also want to redirect fetch
(if not more commands, I'm not that good with Git).
edited Jun 21 at 12:41
answered Jun 21 at 12:36
Tomasz
8,01552560
8,01552560
I thought about that. The constraint is that client should be agnostic to the change. I was hoping for soething similar to http redirect. Like apache mod_rewrite for http but for ssh.
â Ezwig
Jun 21 at 13:22
add a comment |Â
I thought about that. The constraint is that client should be agnostic to the change. I was hoping for soething similar to http redirect. Like apache mod_rewrite for http but for ssh.
â Ezwig
Jun 21 at 13:22
I thought about that. The constraint is that client should be agnostic to the change. I was hoping for soething similar to http redirect. Like apache mod_rewrite for http but for ssh.
â Ezwig
Jun 21 at 13:22
I thought about that. The constraint is that client should be agnostic to the change. I was hoping for soething similar to http redirect. Like apache mod_rewrite for http but for ssh.
â Ezwig
Jun 21 at 13:22
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451056%2fis-it-possible-to-redirect-ssh-traffic-not-forward-how%23new-answer', 'question_page');
);
Post as a guest
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
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
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
Like a redirection rule in a firewall on Server A?
â Kusalananda
Jun 21 at 9:46
I don't think this is offered by the standard ssh tools.
â Tomasz
Jun 21 at 11:52
I'd rather try to use HTTP instead of SSH.
â Tomasz
Jun 21 at 11:54
@Tomasz it has to be over SSH
â Ezwig
Jun 21 at 12:28