A
A
aroun2015-09-05 14:58:11
Node.js
aroun, 2015-09-05 14:58:11

How to send a command to one of the interfaces with the same addresses?

There are two interfaces
192.168.110.11/24
192.168.110.12/24
They are independent devices, inside their address
192.168.110.1
192.168.110.1
I.e. the same.
I need to send a command via ssh to one of the two devices, how to do it?
For example curl supports the -i switch i.e. you can select a device, but ssh can't do that.
How to be?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
T
TyzhSysAdmin, 2015-09-05
@POS_troi

The interface will be selected according to the routing table.

D
Dmitry, 2015-09-05
@dmib

iptables and mark should help.
habrahabr.ru/post/173713

B
BersBaD, 2015-11-22
@BersBaD

try this
ssh -b 192.168.110.11 -l user 192.168.110.1
ssh -b 192.168.110.12 -l user 192.168.110.1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question