0

I have two network interfaces having IP as eth0:192.168.10.3 and eth1:192.168.10.5 . Both the interfaces are connected to different network switch. So is there any way to divert the ssh traffic to particular interface like eth0 or eth1. I tried with -b flag from ssh but it didn't work.

eg ssh -b 192.168.10.5 user@ip

2
  • 1
    I'm not sure whether there are any duplicates, but the short answer is "policy routing via ip rule". Commented Feb 7, 2018 at 7:31
  • 1
    Your network is broken and you should be looking to fix it - having 2 networks with the same IP range is a recipe for disaster. In order to provide an answer we need to know if thevSSH box is directly attached to eth1, and if not what the MAC and IP addresses of the gateway are. You would then need to do some horrible, messy, bad source routing - do really, fix your network.
    – davidgo
    Commented Feb 7, 2018 at 7:35

0

You must log in to answer this question.

Browse other questions tagged .