SSH Configuration for multiple IP addresses (round-robin or randomized)
2
votes
1
answer
1204
views
I have a machine that I am using as an SSH jumphost which has multiple ethernet ports each of which has its own IP address (192.168.1.22 and 192.168.1.178 in case it matters). I use SSH for a lot of stuff, in particular large file transfer. I would like to evenly distribute SSH traffic amongst these two ethernet ports. I don't really care if its a round-robin configuration or if every time I connect it picks one of the two IP addresses at random so long as the traffic is more-or-less evenly distributed.
On top of this, the jumphost is accessible via SSH from the outside world with two port-forward configurations, one port (let's say 22) points to the first IP address and another (let's say 2222) points to the other IP address. Its arguably more important that I figure out how to "round-robin" between the two ports rather than the two IP addresses since the jumphost matters most when I am outside my network.
Is there an SSH config example I could use for something like this? I've been unable to find one. Potentially using the Match keyword? I've tried adding multiple IP addresses to the Host field, but it just uses the first one and ignores the rest.
Asked by RedHack
(141 rep)
Nov 24, 2022, 02:00 AM
Last activity: Dec 10, 2022, 04:25 AM
Last activity: Dec 10, 2022, 04:25 AM