I have two sets of servers, one which starts with ab22 and one that starts with cd22. For ab22 hosts(ab22*), we have to first ssh to a host A1 and then to the specific host. For cd22 hosts(cd22*), we have to first ssh to host B1 and then to the specific host.
I want to ssh these hosts directly from my home directory.It should ssh the hostname that I provide.
So, if i provide ab22xyz, it shud go there and if i provide ab22lmn, it should go there.
From what i ve been able to find, I feel it will use the ~/.ssh/config file but I am not able to make these settings.
I cannot add the individual hosts in the config file since the number is huge.
Can someone please help me. I need to know if it's possible and if yes, how is it possible.
Please provide the entry to be made in host file.
(I have my keys setup for login to A1 and B1 but not to indiv servers)
Please help. Thanks