<div dir="ltr">You can always setup .ssh/config with the hostname you want to point to the IP address like this:<div><br><div><div>Host ngc</div><div> HostName 10.42.204.47</div><div> user root</div></div><div><br></div><div>Though, you should either setup DNS internally if you have a lot of hosts, or edit /etc/hosts to let you resolve the name. </div><div><span style="font-family:monospace">
<br></span></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 4, 2016 at 10:03 AM, R Kimber <span dir="ltr"><<a href="mailto:richardkimber@btinternet.com" target="_blank">richardkimber@btinternet.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have a raspberry pi that runs max2play. My router sees this device as<br>
'max2play'. However if I try to ssh to it from my Ubuntu machine,<br>
ssh root@max2play gives:<br>
'Could not resolve hostname max2play: Name or service not known'<br>
I can, of course connect using the IP address.<br>
<br>
How do I configure ssh so that I can use the device's name? I tried<br>
various suggestions.<br>
ssh-keygen -R max2play, and ssh-keygen -R [IP]<br>
seemed to work and update the known_hosts, but I still could not connect<br>
(Name or service not known)<br>
<br>
I tried<br>
>ssh -o StrictHostKeyChecking=no root@max2play, but got<br>
ssh: Could not resolve hostname max2play: Name or service not known<br>
<br>
Is there a simple way of aliasing the IP address with the name?<br>
<br>
- Richard<br>
<span class="HOEnZb"><font color="#888888">--<br>
Richard Kimber<br>
<br>
<br>
--<br>
ubuntu-users mailing list<br>
<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" rel="noreferrer" target="_blank">https://lists.ubuntu.com/<wbr>mailman/listinfo/ubuntu-users</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><p><span style="font-size:10.0pt;font-family:Arial;color:#333333">Mark Haney
::: Senior Systems Engineer</span></p><b><span style="font-size:10.0pt;font-family:Arial;color:#333333">VIF</span></b><span><span style="font-size:10.0pt;font-family:Arial;color:#333333"> </span><span style="font-size:10.0pt;font-family:Arial;color:#333333"><b>International Education</b></span></span><br><span style="color:rgb(51,51,51);font-family:Arial;font-size:10pt">P.O. Box 3566 ::: Chapel Hill, N.C.
27515 ::: USA</span><div><span style="font-size:10pt"><a><span style="font-family:Arial;color:#1155cc">919-265-5006</span></a></span><span><span style="font-size:10.0pt;font-family:Arial;color:#333333"> </span></span><span style="font-size:10pt;font-family:Arial;color:rgb(51,51,51)">office</span></div><div><span style="color:rgb(51,51,51);font-family:Arial;font-size:10pt"><br></span><span style="color:rgb(51,51,51);font-family:Arial;font-size:10pt;background-color:white">Global learning
for all.</span><br><a href="http://www.viflearn.com" style="font-family:Arial;font-size:10pt" target="_blank">www.viflearn.com</a><div><span style="font-size:10pt;font-family:Arial;background:white">Find VIF on<span> </span></span><span style="font-size:10pt;font-family:Arial"><a href="http://facebook.com/VIFInternationalEducation" target="_blank"><span style="color:#1155cc;background:white">Facebook</span></a></span><span><span style="font-size:10.0pt;font-family:Arial;color:#222222;background:white"> </span></span><span style="font-size:10pt;font-family:Arial;color:rgb(34,34,34);background:white">|<span> </span></span><span><span style="font-size:10.0pt;font-family:Arial;color:#1155cc;background:white"><a href="https://twitter.com/vifglobaled" target="_blank">Twitter</a> </span></span><span style="font-size:10pt;font-family:Arial;background:white">|<span> </span></span><span style="font-size:10pt;font-family:Arial"><span style="color:#1155cc;background:white"><a href="http://www.linkedin.com/company/vif-international-education" target="_blank">LinkedIn</a></span></span><p><span style="font-size:10.0pt;font-family:Arial;color:black">
Recognized as a<span> </span><a href="http://bestfortheworld.bcorporation.net/" target="_blank"><span style="color:#1155cc">‘Best
for the World’</span></a><span> </span>B Corp!</span></p>
</div></div></div></div></div></div></div>
</div>