my goal is to be able to type:
srv01.sms and it connects to srv01.anything0.example
srv02.mail and it connects to srv02.anything1.example
I know that i can edit my .ssh/config file to do something like this, but i don't want to edit my .ssh/config file for 500 servers
Is there a way to do this? In ssh config? bash aliases?
ssh
where the other user wantssudo
, but the rest seems similar. – Kamil Maciorowski Apr 05 '22 at 08:13srv01.sms
, but the answer that "really helped you" requires you to typessh srv01.sms
, so I'm confused. Your comment under the answer makes me believe thatsrv01.smsandmore.example
is not really what you want, possiblysrv01.andmore.example
or something. Ideally the question like yours should state clear requirements and stick to them. You can [edit] (a good step after "sorry that I didn't wrote that"), but remember an edit that invalidates existing answer(s) is not a good thing. Please at least clarify if typingssh srv01.sms
is acceptable. – Kamil Maciorowski Apr 05 '22 at 15:47