I have three machines, let's say 10.49.1.101, 10.49.1.102, 10.49.1.103. These IP's are also present each other in /etc/hosts file. If I simply do ssh between these machines it works completely fine. But If I try to remove folder using ssh something like this from 10.49.1.101
for rs in `cat "ip-s"`; do echo $rs; ssh $rs "rm -rf path/to/dir"; done
// ip-s contains all the 3 server ips
will throw a below error and it won't succeed. But it works from 10.49.4.102, 10.49.4.103
: Name or service not knownname 10.49.1.102
: Name or service not knownname 10.49.1.103
FYI, These are the redhat versions
- 10.49.1.101 - Redhat 7.7
- 10.49.1.102 - Redhat 6.6
- 10.49.1.103 - Redhat 6.6
Is it a redhat-7.7 version problem. If yes, how to fix this issue?
IPtoSSH, but the prompt seems to be related toDNSSSH hostname, It works again. I verified the spelling in/etc/hosts. No mistakes found