LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ssh connect to systems using hostname which are exist in different domains (http://www.linuxquestions.org/questions/linux-newbie-8/ssh-connect-to-systems-using-hostname-which-are-exist-in-different-domains-774196/)

nagendrar 12-08-2009 05:14 AM

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

repo 12-08-2009 05:18 AM

Do the hostnames resolve?
Code:

ping hostaname1
ping hostaname2

use ssh as user then become root using su or sudo

nagendrar 12-08-2009 05:24 AM

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

repo 12-08-2009 05:37 AM

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?

nagendrar 12-08-2009 05:43 AM

These two IPs have Different DNS search paths.

ThanQ,
NAgendra

nagendrar 12-08-2009 05:45 AM

Here I able to do ssh connection or ping using host IP,

ThanQ,
Nagendra R

repo 12-08-2009 05:48 AM

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

Quote:

ip hostname

nagendrar 12-08-2009 05:58 AM

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

repo 12-08-2009 06:01 AM

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.


All times are GMT -5. The time now is 12:24 AM.