LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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
 
LinkBack Search this Thread
Old 07-30-2004, 09:49 AM   #1
soichih
LQ Newbie
 
Registered: May 2004
Posts: 8

Rep: Reputation: 0
Need to specify the full URL path.. Why?


Hi. I am afraid if there is a similar question somewhere in this forum, but let me ask this question anyway...

Okay, I have my linux box in a coorporate LAN with the name of mybox.mycorp.com

When I want to access to anothebox.mycorp.com, I can do "ssh anotherbox.mycorp.com". However, if I try just "ssh anotherbox", I get an error message says, "unknown host anotherbox".

I know that if I go to another PC, I can just type "ssh mybox" to login to my box, so it seems like I am the only person who has to type all URL!!

Is there a configuration somewhere that I can fix this issue?

Currently I have following entries in the /etc/sysconfig/network file

NETWORKING=yes
HOSTNAME=mybox
GATEWAY=60.28.72.33
DOMAINNAME=mycorp.com

Last edited by soichih; 07-30-2004 at 09:52 AM.
 
Old 07-30-2004, 10:54 AM   #2
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
add an entry for the box in your local /etc/hosts file...

the format is two columns... ip and name... for example:

192.168.0.1 anotherbox1

192.168.0.2 anotherbox2



Last edited by win32sux; 07-30-2004 at 10:56 AM.
 
Old 07-30-2004, 05:20 PM   #3
soichih
LQ Newbie
 
Registered: May 2004
Posts: 8

Original Poster
Rep: Reputation: 0
Thank you for your reply.

Does it mean that if the IP of the "anotherbox" changes, then I have to manually modify the host file also??

I mean, if that's the only solution, then how come other box can access my box without the domain name nor listing my box's IP on THEIR /etc/hosts file?

Last edited by soichih; 07-30-2004 at 05:21 PM.
 
Old 07-31-2004, 08:37 AM   #4
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
if you want to be able to do "ssh anotherbox" and have it automatically connect to anotherbox.mycorp.com (no matter what the ip is), then you probably only need to add a line like this to the /etc/resolv.conf file on the machine you're starting the connection from:

search mycorp.com

=)
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
full path of a file ttilt Linux - General 1 11-08-2005 06:02 PM
get full path of a command (in C) Hady Programming 9 11-21-2003 10:50 AM
get full path of a command (in C) Hady Linux - Software 1 11-19-2003 05:46 PM
Full Path problems chedmaster Linux - Newbie 1 06-26-2003 10:24 AM
How to get executable's full path using C/C++? oldbee Programming 6 02-19-2002 09:21 AM


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