in Linux, Ubuntu

Routing to allow SSH over a specific interface

Sometime when you have two network interfaces (say eth0 and eth1) on the client and for some reason there is a need to SSH to the server over a specific a specific interface. By default the primary interface will be used. To use eth1 we just need to add a route:

route add -net netmask gw eth1

The route is removed upon reboot. Use -p to permanently add the route to the table. To delete the route:

route del -net netmask gw eth1