Rcp error while transferring files


 
Thread Tools Search this Thread
Operating Systems AIX Rcp error while transferring files
# 1  
Old 01-07-2014
Rcp error while transferring files

i am trying to use a rsh script that uses the rcp command to copy files from server to server but it always produce the following error:

HOSTNAME: protocol failure due to unexpected closure from server end
Error: failed to copy /test to HOST2 system
Error: failed to execute command on remote host HOST2

i have checked .rhosts file and hosts.equiv and everything seems to be fine. All entries are correct

i have checked the firewall and it seems that rsh port 514 still accepts UDP/TCP connections which seems to be fine too.

i also have tested the port with telnet commend and gets connected

i am confused Smilie i couldn't find any solution over the internet Smilie

i hope you guys help me find a way to solve this problem

many thanks

---------- Post updated at 03:04 AM ---------- Previous update was at 02:55 AM ----------

i forgot to mention that i am using AIX 7.1
# 2  
Old 01-07-2014
Many admins have stopped the r* daemon, as it has too weak security, and use ssh/scp/sftp. Try a local copy using IP addresses and short and long host names before trying remote. Make sure there is a daemon to service rcp. Do not use root id. BTW, to copy /test you need write permission on /.
This User Gave Thanks to DGPickett For This Post:
# 3  
Old 01-07-2014
Any log file entries?
# 4  
Old 01-08-2014
Quote:
Originally Posted by DGPickett
Many admins have stopped the r* daemon, as it has too weak security, and use ssh/scp/sftp. Try a local copy using IP addresses and short and long host names before trying remote. Make sure there is a daemon to service rcp. Do not use root id. BTW, to copy /test you need write permission on /.
thanks for your reply the idea that i have almost 25 servers connected to the server i am working on, yet 24 of them still receiving the file with no errors except for the one i have mentioned above, i tried to use the rcp command directly but it didn't work either it still giving me the same error

i am sorry i couldn't understand how the local copy can be done ? i'm also not familiar with daemon and how to make sure if it is going to receive rcp or not

i would really appreciate your help.

---------- Post updated at 02:43 AM ---------- Previous update was at 02:32 AM ----------

Quote:
Originally Posted by RudiC
Any log file entries?
which logs you want to check ? so i can copy them here Smilie
# 5  
Old 01-08-2014
Quote:
Originally Posted by Portabello
i am sorry i couldn't understand how the local copy can be done ? i'm also not familiar with daemon and how to make sure if it is going to receive rcp or not
A "daemon" in Unix is generally just a background job, usually one which is relevant for the system. Read more in wikipedia about it.

What DGPickett tried to tell was: r-commands transfer files without any encryption, therefore everybody listening on the "same wire" (=every network card in the same subnet) could read them too as they are transferred. They also handle their communication, even up to passwords, unencrypted. This is why most have shifted from r-commands to other means of achieving the same but with encryption of the transported data. This in most cases is "ssh" to replace any remote connection (telnet, rsh, remsh, rlogin, ....) and either "sftp" or "scp" to replace file transfer (ftp, rcp, ...).

When you install "scp", the basic command to transfer a file would be:

Code:
scp userA@hostA:/path/to/sourcefile userB@hostB:/path/to/target

which reads "sourcefile" as userA at hostA and then transfers it to hostB, where it attempts to write it as "target" using user-ID "userB". DGPickett suggests (and rightly so) that, when you install this, you start with transferring a file locally:

Code:
scp userA@hostA:/path/to/testfile [userA|userB]@hostA:/path/to/target

Where "hostA" is a short hostname first, then a long hostname:

Code:
scp me@host:/tmp/test me@host:/tmp/target
scp me@host.network.com:/tmp/test me@host.network.com:/tmp/target

This makes sure name resolution is working correctly, at least for this host. Only then attempt to transfer the file to a remote destination.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 6  
Old 01-22-2014
Try your one host with the IP not a hostname. Try an rcp on that host from and to same target id, then try any user id change. Rcp should work, if properly configured.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Transferring files to directories

I have a large number of files with file names of the format iv.epoz.hhe.d.2018.028.000000.sac iv.epoz.hhn.d.2018.028.000000.sac iv.epoz.hhz.d.2018.028.000000.sac iv.epoz.hhe.d.2018.029.000000.sac iv.epoz.hhn.d.2018.029.000000.sac iv.epoz.hhz.d.2018.029.000000.sac... (4 Replies)
Discussion started by: kristinu
4 Replies

2. Shell Programming and Scripting

How can we overcome Broken pipe error during scp,SFTP,Rsync while transferring big files.?

Hello All, Hope all are doing well. We use scp (some times sftp and rsync also) for transferring big files (around 2GB each ) from 1 Network to another Network. The Issues which we face :- During transfer some times( Once in 1 week (or twice)) , the speed of transfer gets down to 30 kb/s,... (2 Replies)
Discussion started by: Upendra Bhushan
2 Replies

3. Shell Programming and Scripting

Script for transferring files

Hi Guys, I have to transfer a few files in my system . The commands to be used are as follows . Will it be possible to send the output of the following in the form of a mail . cd /export/home/teja ls -lrt Quote.java* mv Quote.java Quote.java.20121023 cp /tmp/Quote.java . ls -lrt... (2 Replies)
Discussion started by: Ravi_Teja
2 Replies

4. UNIX for Dummies Questions & Answers

Transferring files from one linux server into another

Hello , I want to transfer files from one linux server into another , I got it working using SCP command , but I have to type in password for each and every file . All the remote severs have the same password , so is there a way that I can transfer all these files by typing my password only once ? (5 Replies)
Discussion started by: RaviTej
5 Replies

5. Shell Programming and Scripting

Transferring Files via ssh (bash)

I am trying to transfer my website using ssh(hostbasedauthentication) using: sudo ssh -o "PasswordAuthentication no" -o "HostbasedAuthentication yes" -l testuser 192.168.3.1 "find /var/www/vhosts/mywebsite.com -depth | grep -f include| cpio -oavc| gzip" > $backup_dir/fullwwwsite$date.cpio.gz ... (5 Replies)
Discussion started by: metallica1973
5 Replies

6. AIX

Transferring files via RS232 cable

Current setup: Some old AIX standalone machine (F series) My WinXP laptop Null modem cable from laptop to AIX machine (console port). On Hypterminal on WinXP I can connect to the AIX machine (serial connection), but when I try to transfer file, it will just sit there. I'm guessing the... (3 Replies)
Discussion started by: apra143
3 Replies

7. AIX

Transferring files between Windows and AIX

How do I transfer Plain Text and/or BMP image files between my WindowsXP PC and my AIX 4.1 PowerPC? I have no network or USB options, just a Floppy disk drive and a CD drive on each machine. Is it possible at all? Any help would be gratefully received:) (7 Replies)
Discussion started by: Pennant Man
7 Replies

8. Shell Programming and Scripting

FTP - To handle error while transferring files

Hi, I had written an FTP script where in I loop through the directories and transfer the files from each and every directory of Windows to UNIX. Now the problem is when 1. The connection is unable to be established I should return some error codes 2. When there is some system... (1 Reply)
Discussion started by: mahalakshmi
1 Replies

9. UNIX for Dummies Questions & Answers

Transferring hidden files with scp

Is there a way to scp hidden files only ( with regex ) without specifying the name of the hidden files ? Many thanks in advance ! :) (13 Replies)
Discussion started by: matrixmadhan
13 Replies

10. UNIX for Dummies Questions & Answers

transferring files to and from remote computer

Hi all, i first have to ssh into my university account and then through there another ssh into my office computer, from my home computer. I have been trying to transfer files to and from with no such luck. How do i send a file from home to my office computer. Do I have to send it to my... (6 Replies)
Discussion started by: yogi1
6 Replies
Login or Register to Ask a Question