I have several servers-- each with a unique hostname on a LAN. I am unable to ssh via hostname-- only using it's IP address.
When I add the IPs and hostnames to my hosts file it works, but I have many servers... My old distribution did not require manually assigning them... I was able to login directly using the remote servers hostname.
Code: Select all
manderson@mander-nux ~ $ ssh root@b01-c
When I do it by IP Address it is correct-- see below.
Code: Select all
manderson@mander-nux ~ $ ssh root@192.168.1.10
Linux B01-C 4.1.9 #1 SMP PREEMPT Tue Nov 22 18:27:45 PST 2016 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Aug 17 10:49:28 2018 from 192.168.1.251
root@B01-C:~#
I recently switched to Mint from another distribution and did not have this issue.
Code: Select all
####################MINT INFO##############################
RELEASE=18.3
CODENAME=sylvia
EDITION="KDE 64-bit"
DESCRIPTION="Linux Mint 18.3 Sylvia"
DESKTOP=KDE
TOOLKIT=QT
NEW_FEATURES_URL=http://www.linuxmint.com/rel_sylvia_kde_whatsnew.php
RELEASE_NOTES_URL=http://www.linuxmint.com/rel_sylvia_kde.php
USER_GUIDE_URL=`yelp help:linuxmint`
GRUB_TITLE=Linux Mint 18.3 KDE 64-bit
Code: Select all
#######################RESOLVE.CONF#######################
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
Code: Select all
####################NSLOOKUP####################
manderson@mander-nux /etc $ nslookup b01-c
Server: 127.0.1.1
Address: 127.0.1.1#53
** server can't find b01-c: NXDOMAIN
I was hoping not to have to add all of them to the /etc/host file--- but I think this might be the only solution.
Thank you !!