LinuxQuestions.org
Visit Jeremy's Blog.
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 09-20-2005, 03:36 AM   #1
joshtt
LQ Newbie
 
Registered: Apr 2003
Location: Belgium
Distribution: Mandrake 10.0
Posts: 17

Rep: Reputation: 0
Cannot SSH/FTP by hostname, but ip works Solved!


Hi all!

I know a thread like this already exists and I posted there too, but no one is looking at that one anymore, so here goes....
I can connect to my machine via ssh using the ip, but not using the hostname.
I'm a linux noob, so beware. ;-)

When the pc starts it sets the correct hostname, so that should be fine.
My /etc/hosts file looks like this:

127.0.0.1 localhost
computers-static-ip computer.univ.ac.be

When I try to ssh using the hostname, ii times out.....
Am I missing something else here?
Oh yeah, same thing happens when trying to sftp.... ip works, hostname doesn't.
Using Mandriva 10.2 (which includes that security center with different security levels).

Thanks!

Last edited by joshtt; 07-28-2006 at 08:35 AM.
 
Old 09-20-2005, 03:52 AM   #2
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
I don't think you need to put a line in your /etc/hosts file; your DNS should be able to look it up. What does it say if you do "nslookup <hostname>" and "nslookup <computers-static-ip>"?
 
Old 09-20-2005, 04:23 AM   #3
joshtt
LQ Newbie
 
Registered: Apr 2003
Location: Belgium
Distribution: Mandrake 10.0
Posts: 17

Original Poster
Rep: Reputation: 0
Hi spooon,

thanks for helping me out.
I did nslookup with the ip and the hostname.
Strange, looking up with the ip returns a hostname different that the one that should be assigned to me.
And looking up with the hostname returns an ip that's not mine.

Am I correct to conclude that I'm using the wrong hostname?

Josh
 
Old 09-20-2005, 05:08 AM   #4
joshtt
LQ Newbie
 
Registered: Apr 2003
Location: Belgium
Distribution: Mandrake 10.0
Posts: 17

Original Poster
Rep: Reputation: 0
Ok, I just reconfigured my network settings to use the other hostname and it works!!!!
Seems like those guys at the networking center here at the univ. gave me the wrong hostname.

Thanks for helping me out, spooon!!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
can ssh by IP, can't by hostname. FLOODS Linux - Networking 7 09-19-2005 01:41 PM
http works, ssh too, ftp won't :\ ilhbutshm Linux - Networking 4 11-15-2004 12:08 AM
Ping or SSh by hostname ElectroLinux Linux - Newbie 2 10-26-2004 03:21 AM
can't ssh through hostname romel Linux - Networking 4 07-25-2004 01:54 PM
Unable to access my ssh server and ftp server from the Internet, but smtp works foxone Linux - Networking 1 05-28-2004 05:17 PM

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

All times are GMT -5. The time now is 08:24 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