LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-08-2009, 06:14 AM   #1
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 146

Rep: Reputation: 15
ssh connect to systems using hostname which are exist in different domains


I want to do ssh connection to two or more systems using hostname, these systems (hostanmes) are existing in different domains.

How can I connect?

EX: ssh root@<hostaname1>
ssh root@<hostaname2>

Please help me


ThanQ,
NAgendra Rednam
 
Old 12-08-2009, 06:18 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,516

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
Do the hostnames resolve?
Code:
ping hostaname1
ping hostaname2
use ssh as user then become root using su or sudo
 
Old 12-08-2009, 06:24 AM   #3
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 146

Original Poster
Rep: Reputation: 15
one host is reachable but for another host i am getting "ping: unknown host" message

Here I can not resolve two different domains at the same time.Please help me.

ThanQ,
Nagendra
 
Old 12-08-2009, 06:37 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,516

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
Quote:
Here I can not resolve two different domains at the same time.Please help me.
What o you mean by different domains?
Are they in your LAN
Are they in a different subnet?
Are they outside your network?
 
Old 12-08-2009, 06:43 AM   #5
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 146

Original Poster
Rep: Reputation: 15
These two IPs have Different DNS search paths.

ThanQ,
NAgendra
 
Old 12-08-2009, 06:45 AM   #6
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 146

Original Poster
Rep: Reputation: 15
Here I able to do ssh connection or ping using host IP,

ThanQ,
Nagendra R
 
Old 12-08-2009, 06:48 AM   #7
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,516

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
If the IP is permanent,
You can add them to your /etc/hosts file

Quote:
ip hostname
 
Old 12-08-2009, 06:58 AM   #8
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 146

Original Poster
Rep: Reputation: 15
Yes, now I able to ping using hostname.

ThanQ for help . Is it possible to ping without adding individual hosnames in /etc/hosts file, here all hosts have same DNS search path.

ThanQ,
Nagendra R
 
Old 12-08-2009, 07:01 AM   #9
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,516

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
If your DNS server doesn't resolve the hostnames, you need to add them in the hosts file.
However, you can ask IT to add them to the DNS server.
 
  


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
Unable to connect SSh with hostname... Makri Linux - Newbie 2 12-07-2009 06:20 PM
Hostname for SSH llagunocap Linux - Newbie 10 05-16-2008 08:57 AM
SSH will not connect to hostname, only IP address. nominruil Linux - Networking 2 06-03-2007 02:26 PM
postfix hostname parameter for multiple domains? paddyjoy Linux - Server 3 09-21-2006 05:58 PM
Can firewall and ssh co-exist in RedHat 9.0? adamliu Linux - Security 3 05-20-2005 11:10 AM


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

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