LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 05:14 AM   #1
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 154

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, 05:18 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

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

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, 05:37 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
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, 05:43 AM   #5
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 154

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

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

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

ThanQ,
Nagendra R
 
Old 12-08-2009, 05:48 AM   #7
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

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

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

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, 06:01 AM   #9
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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