SSH | Network is unreachable

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
mandersonrmark
Level 1
Level 1
Posts: 1
Joined: Fri Aug 17, 2018 1:55 pm

SSH | Network is unreachable

Post by mandersonrmark » Fri Aug 17, 2018 2:27 pm

Hello Everyone..
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
ssh: Could not resolve hostname b01-c: Name or service not known

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 have created an ssh rsa public profile on my server
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
cd /

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 !!
Last edited by mandersonrmark on Fri Aug 17, 2018 4:05 pm, edited 1 time in total.

rene
Level 8
Level 8
Posts: 2226
Joined: Sun Mar 27, 2016 6:58 pm

Re: SSH | Network is unreachable

Post by rene » Fri Aug 17, 2018 4:05 pm

If b01-c is running mDNS (on Linux, in the form of Avahi) you'll be able to address it as b01-c.local. Or B01-C.local as per your SSH login display, but I do believe mDNS is case insensitive.

I suppose the difference with your previous distribution may be B01-C having Samba running and the previous distribution on "mander-nux" having WINS enabled by default; that you were using Windows name resolution.

Post Reply

Return to “Other networking topics”