LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 04-02-2007, 10:50 AM   #1
Pezzoni
LQ Newbie
 
Registered: Jan 2005
Posts: 18

Rep: Reputation: 0
Setting network hostname on CentOS 4.4


This is probably (and hopefully) a stupid question with a trivial answer, so sorry in advance!

I've just installed CentOS 4.4, and all seems to be OK. What I'm attempting to do is to set the remote hostname of the computer (terminology probably wrong, but I'll attempt to explain).

The 'local' hostname of the computer is fine; when I log in, I see:
[root@webserver ~]#
Which I was expecting. Typing 'hostname' returns 'webserver'.

What I do want to be able to do is to refer to the computer as //webserver from other computers on the network. The other Linux box (running FC5) can be accessed by //linuxserver... Could someone explain where I've gone wrong?

Thanks

(As an aside, when I login via SSH, the 'password:' prompt takes a while - about 10-20 seconds - to appear; is this a function of me having cocked the DNS settings up a bit?)

Last edited by Pezzoni; 04-02-2007 at 10:52 AM.
 
Old 04-02-2007, 10:59 AM   #2
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
Would linuxserver be a prexisting DNS entry somewhere? Are you using WINS? If it is WINS there is a program with samba called winbind you may look into.

If linuxserver is a DNS entry somewhere then just add webserver to the dns server
 
Old 04-02-2007, 11:01 AM   #3
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,028
Blog Entries: 5

Rep: Reputation: 790Reputation: 790Reputation: 790Reputation: 790Reputation: 790Reputation: 790Reputation: 790
//webserver would pull it up if
a) webserver was first resolved as the IP of this host from the host on which you're trying to pull it up in the browser (has to do with the DNS/resolv.conf on that machine rather than anything on webserver itself.
b) You are running something that is listening on the standard httpd port (80) on webserver. ("lsof -i :80" would verify that).
c) You are not blocking outside connections to port 80 in the firewall on webserver, firewall between the boxes or firewall on the server where you ran the browser.
 
Old 04-02-2007, 11:01 AM   #4
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
You want other machines to see the machine as //winserver instead of just a plain IP. For that to work on say the fc5 box you will need to edit /etc/hosts file and add a reference for the IP to hostname.

For ssh log delay can depend on a few things. I assume both machines are on the same network segment? If so then my guess the ssh conection is trying to do passphrases first. Usually a little delay but not much over 5 seconds. I am guessing you are on the right track with the DNS and not resolving correctly which if you are employ this then it can be the issue you have in question one. If you use the IP instead of a hostname does it work faster?

Brian
 
Old 04-02-2007, 11:11 AM   #5
Pezzoni
LQ Newbie
 
Registered: Jan 2005
Posts: 18

Original Poster
Rep: Reputation: 0
Ahh, linuxserver is running samba, so presumably WINS has something to do with its being resolved? On further investigation, I can't access it by hostname from webserver, whereas I can from my Windows machine with a samba network drive mounted. I'll have to sort samba out on webserver in that case, and then maybe come back to this one.

With that (hopefully) out of the way, does anyone have any ideas about the ssh login problem?
 
Old 04-02-2007, 11:47 AM   #6
Pezzoni
LQ Newbie
 
Registered: Jan 2005
Posts: 18

Original Poster
Rep: Reputation: 0
Okay, after configuring samba, I can connect to the server with //webserver, so that issue seems to be resolved!
 
Old 04-02-2007, 02:04 PM   #7
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,028
Blog Entries: 5

Rep: Reputation: 790Reputation: 790Reputation: 790Reputation: 790Reputation: 790Reputation: 790Reputation: 790
D'oh - got distracted by the webserver name - I thought you were asking how to open an http connection to it rather than a wins connection.
 
  


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
Setting network options & proxy in CentOS LDJ Linux - Newbie 2 09-13-2006 10:07 AM
Setting network interface to use on CentOS kgoth Linux - Networking 1 12-10-2005 05:30 AM
Setting Hostname abhijeetudas Linux - Networking 1 06-04-2005 08:10 AM
Network Hostname setting jianandyli2 Linux - Networking 1 09-22-2003 10:33 PM
setting up a hostname sakeeb Linux - Networking 3 04-28-2002 05:37 AM


All times are GMT -5. The time now is 05:08 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration