[![enter image description here](https://i.stack.imgur.com/2a3iB.png)](https://i.stack.imgur.com/2a3iB.png)

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:

1. SSH to server A
2. Server A tells client to go to server B instead
3. 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**

1. Client Pulling from server A and is closer to server B is redirected to B
2. When pushing, client remains on server A