1753275 Members
4700 Online
108792 Solutions
New Discussion юеВ

Re: RCP Misbahaviour

 
SOLVED
Go to solution
G V R Shankar
Valued Contributor

RCP Misbahaviour

Hi All,

Following is the scenario

ServerA and userA
ServerB and userB

userB's .rhosts. I have put ServerA's FQDN
ServerA userA

ServerAUserA#rcp test.txt userB@ServerB:/home/userB/
remshd: Login incorrect.
If I remove the FQDN and put the IP address in userB's .rhosts file, rcp works fine.

nslookup on both the servers is working fine. No DNS issues.

Coudl some one please explain me this behaviour?

Ravi.

9 REPLIES 9
Tingli
Esteemed Contributor
Solution

Re: RCP Misbahaviour

Try to put the both ip addresses in /etc/hosts file in both servers.
OldSchool
Honored Contributor

Re: RCP Misbahaviour

fqdn used one place but not the other?
try shortname in place of fdqn in userB's .rhosts. file.
Bijeesh
Respected Contributor

Re: RCP Misbahaviour

hi
put the hostname of ServerA and username in serverB's .rhosts file.This should work.
G V R Shankar
Valued Contributor

Re: RCP Misbahaviour

Hi,

It is only working with IP address. It doesn't work with hostname and FQDN

Ravi.
Patrick Wallek
Honored Contributor

Re: RCP Misbahaviour

>>nslookup on both the servers is working fine. No DNS issues.

nslookup of what?

Do an nslookup of both the IP address **AND** the hostname (both FQDN and just the hostname) and see if you get the answers you expect.

My guess is that something is not returning the correct information when using hostname.
G V R Shankar
Valued Contributor

Re: RCP Misbahaviour

nslookup hostname
nslooukup FQDN
nslookup IP

from both the servers is giving the correct resolution

the only difference that i see,

In resolve.conf, primary DNS in serverA is Secondary DNS in ServerB and Secondary DNS in serverA is primary in ServerB.

Cheers,

Ravi
Bill Hassell
Honored Contributor

Re: RCP Misbahaviour

You must EVERY possible representation of the hostname in your .rhosts file. That means FQDN, short hostname, long hostname (if used), IP address, everything. Put each variation on a separate line. The problem is with the name resolution which can very different between machines and also very different with OS versions and patches. You may also want to run nsquery to see how nslookup and nsquery may differ, all due to resolver rules.

nslookup abc.com
nsquery hosts abc.com


Bill Hassell, sysadmin
G V R Shankar
Valued Contributor

Re: RCP Misbahaviour

Hi,

I have updated the /etc/hosts file on both the servers with FQDN's.

RCP started working without any probelm.

Because of this I could corner the DNS server. I have removed the entries from /etc/hosts file and logged in to serverB from serverA and issued who -Rm. It was showing IP address.

I did a continous nsquery on the ip address of serverB with an interval of 1 second. Then I found that there are 2 records for 1 IP address.

nsquery hosts IP_ADD "dns"

Informed the same to DNS team and they have removed the incorrect DNS record.

Issue resolved.

Thank You for all your replies.

Cheers,
Ravi.
G V R Shankar
Valued Contributor

Re: RCP Misbahaviour

Solution is provided in my last post.