<html><head>

<style id="css_styles" type="text/css">blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
a img { border: 0px; }
li[style='text-align: center;'], li[style='text-align: right;'] {  list-style-position: inside;}
body { font-family: Tahoma; font-size: 12pt;   }</style></head><body class="plain"><div id="x0de42fcb82b1422"><div id="x0de42fcb82b1422">On 23.11.2022 06:47:27, Feng Shao wrote:</div><div id="x0de42fcb82b1422"><br /></div><blockquote type="cite" class="cite2">There are a bunch of machines in our lab, and we normally don't have DNS records configured for them, only accessing by IP. In order to ssh to them with key auth, I have a config in my .ssh/config like <br /><br />Host *.mylab<br />  User root<br />  IdentityFile ~/.ssh/id_rsa.work<br /><br />and I have some "address=/123.123.123.123.mylab/123.123.123.123" line in dnsmasq.conf. The problem here is I need to add an entry whenever a new IP comes.<br /></blockquote><div id="x0de42fcb82b1422"><br /></div><div id="x0de42fcb82b1422">So you've configured '123.123.123.123.mylab' to be resolved to an IP of '123.123.123.123'.</div><div id="x0de42fcb82b1422"><br /></div><div id="x0de42fcb82b1422">I wonder:</div>If your intention is to ssh into your clients by IP address anyway, then why would you want to involve DNS here at all?</div><div id="x0de42fcb82b1422"><br /></div><div id="x0de42fcb82b1422"><br /></div><div id="x0de42fcb82b1422">Instead of referencing the host by name, e.g.</div><div id="x0de42fcb82b1422"><br /></div><div id="x0de42fcb82b1422">ssh 123.123.123.123.mylab</div><div id="x0de42fcb82b1422"><br /></div><div id="x0de42fcb82b1422">is there a reason why using the IP address directly, e.g.</div><div id="x0de42fcb82b1422"><br /></div><div id="x0de42fcb82b1422">ssh 123.123.123.123</div><div id="x0de42fcb82b1422"><br /></div><div id="x0de42fcb82b1422">would not work for you?</div><div id="x0de42fcb82b1422"><br /></div><div id="x0de42fcb82b1422">Regards,</div><div id="x0de42fcb82b1422">    Buck</div><div id="x0de42fcb82b1422"><br /></div>
</body></html>