Is there any way to abstract IP address during ssh?

Posted by Vivek V K on Super User See other posts from Super User or by Vivek V K
Published on 2014-06-05T00:19:38Z Indexed on 2014/06/05 3:29 UTC
Read the original article Hit count: 512

Filed under:
|
|
|

I have a server which is in the middle of a forest. It is connected to the Internet via a microwave link and an ADSL link.Hence it has two different static IP addresses. Now if there is heavy rain, the microwave link breaks and I should use the much slower ADSL link. And I ping the microwave ip time to time to check if it is up again . But at times, I end up using the very slow ADSL link even if the microwave link is back up. Hence I need a way to automate this in the following way.

1.I need to abstract the IP address of the machine with some other name which when I use ssh or sftp, will poll both the IP and connect me to the best one.

so for eg: if I say ssh -Y name@server, It should first try to connect to the microwave link if it cant, then connect to ADSL.

2.Suppose the first time I connect, the microwave link is down so it connects to ADSL, I need it to dynamically change to the microwave link once it is working again. Is this even possible?

© Super User or respective owner

Related posts about networking

Related posts about wireless-networking