LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-07-2018, 03:26 AM   #1
xunilresu17
LQ Newbie
 
Registered: Nov 2016
Distribution: Trisquel Gnu/linux
Posts: 8

Rep: Reputation: Disabled
ssh- could not resolve hostname


Hellou people I hope everyone is good.
I have this question:
Aparently to use ssh would be something simple (at the begining at least!), but I can't pass this initial problem: can't connect to host.
Let's see, if I put this command in the shell:
$ ssh name@hostname
It always give me the same message:
Could nome resolve hostname hostname: name or service not known.
I mean how I am supose to learn network specifically ssh, if I can't pass this initial step?!
Of course I manage to investigate to work this problem around, and I saw in some forum (maybe here) that if I put .local at the end of hostname it would connect, and it did! But only if I am in a local network, in this case specifically my home, besides that it wont connect.
And this is my problem, I hope you have the patiente and time to help me on this one.
Many many thanks in advance.
 
Old 06-07-2018, 05:18 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,329
Blog Entries: 3

Rep: Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726
Quote:
Originally Posted by xunilresu17 View Post
... if I put .local at the end of hostname it would connect, and it did! But only if I am in a local network, in this case specifically my home, besides that it wont connect.
It's unrelated to SSH.

For the full answer, you'll have to read about the Domain Name System (DNS) and how it is used for "external" addresses. Then compare and contrast that to "internal" addresses and the tricks you have to pull to have a local DNS on the LAN. Also there is a difference between Internet Protcol version 4 (IPv4) and Internet Protocol version 6 (IPv6) addresses.

You LAN's router might have some options to give out host names. That looks like what might be happening, but those names will be limited to the LAN only.
 
1 members found this post helpful.
Old 06-07-2018, 06:50 AM   #3
xunilresu17
LQ Newbie
 
Registered: Nov 2016
Distribution: Trisquel Gnu/linux
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thanks for the answer and for the link. I will read more about DNS, seems interesting. Bye bye
 
Old 06-07-2018, 11:31 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
https://www.digitalocean.com/communi...our-ssh-client
 
2 members found this post helpful.
  


Reply

Tags
netwoking, ssh access



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New to LQ. ssh: Could not resolve hostname... svesmeralda LinuxQuestions.org Member Intro 7 08-09-2015 04:23 AM
How I can resolve the error Postfix? warning: hostname does not resolve to address kanzer Linux - Server 1 03-22-2013 08:56 AM
clients CAN resolve hostname of server w/nslookup, but CANNOT access by hostname WTF? psycroptic Linux - Networking 9 11-10-2012 11:24 AM
SSH Troubles: ssh: Could not resolve hostname: Name or service not known -Xubuntu12 reklaimer Linux - Networking 4 06-03-2012 02:53 AM
Resolve hostname from IP cornish Linux - Networking 10 10-10-2007 10:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration