rcp error


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users rcp error
# 1  
Old 07-02-2004
rcp error

I'm trying to perform a rcp to a remote machine, but it keeps throwing up "LOGNAME: undefined variable" error. When I echo $LOGNAME, it comes up with my username. I have tried setting both the .rhosts and the .hosts.equiv file but to no avail (on both machines as well out of desperation!). Anyone got any ideas?
# 2  
Old 07-02-2004
My guess is that the error is coming from the remote system where LOGNAME is not defined. What is the rcp command that you are trying?
# 3  
Old 07-02-2004
I have a script that searches for and then copies across new files in a certain directory. When this wasn't working I just resorted to touching a file called hello and trying to copy that across.

rcp hello username@hostname:/
# 4  
Old 07-02-2004
What shell does the remote user have? Switch the remote user to sh or ksh. Does the problem persist? If the remote shell was csh or a clone of csh, post the contents of .cshrc.
# 5  
Old 07-02-2004
Unfortunately we can't change the remote host from csh.
Below are the contents of the .cshrc:

set filec
setenv HOST `hostname`


#set prompt="[`hostname`:`pwd`]% "

set prompt="[$LOGNAME@`hostname`:\!]% "


set noclobber
set filec
set history = 40
set autologout = 0
set ignoreeof
umask 002

################################################################################
###

alias h history
alias p pushd
alias po popd
alias c clear
alias ll ls -l
alias ltr "ls -ltr"
stty erase ^H
source setup.csh
# 6  
Old 07-02-2004
That is a terrible cshrc file. Remove the set prompt and the stty stuff. And maybe the source csh.setup depending on what's in that file.
# 7  
Old 07-02-2004
rcp error

ha ha Smilie
no matter how bad, I don't have the authority to change this file! However would you recommend trying to get this moved to say .profile? Is there something in there that you think might be causing my problem - surely the set and stty stuff can't be causing it?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Rsync an rcp error

Hi, I have installed rsync (together with its dependencies) in both source and destination HPUX servers (V 11.31). However when I attempt to copy files over (as user root) I get this error : # rsync -avz ./* root@10.97.131.4:/tmp/copy Password: sh: rsync: not found. rsync: connection... (5 Replies)
Discussion started by: anaigini45
5 Replies

2. AIX

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... (5 Replies)
Discussion started by: Portabello
5 Replies

3. Shell Programming and Scripting

rcp -r || cp -r

what different between two instruction cp -r rcp -r (1 Reply)
Discussion started by: tamer11007
1 Replies

4. UNIX for Dummies Questions & Answers

RCP Failure

I HAVE A PERL SCRIPT WHICH RCP files from one server to another. The script is not having any issues for years and it is running for more than 3 years . Last week it had failed with error "Command timed out " error. Please help me out (2 Replies)
Discussion started by: praviper
2 Replies

5. Shell Programming and Scripting

scp vs rcp

Hi, What is the difference between scp and rcp and what are the advantages and disadvantages? which one is favor to use than the other between these two? Thanks (1 Reply)
Discussion started by: royalibrahim
1 Replies

6. UNIX for Advanced & Expert Users

SSH/RCP connectivity error

Hi Team, Hope you will be able to help me out with this problem. Our sun solaris 9 system receives Idoc files from another xxx system through RCP. But before RCP they establish an SSH connection. Since today morning they are not able to establish connection and is getting an error as pasted below... (0 Replies)
Discussion started by: anitha111
0 Replies

7. UNIX for Dummies Questions & Answers

Error while doing rcp to localhost

Hi, Rcping a file to localhost fails due to echo statement in .login file on a machine with RH 5.5 However, the same rcp is successful on another machine with Suse 9.2 (with the same .login). I cannot change .login file and was wondering at what could be causing this ? Command that I am... (2 Replies)
Discussion started by: coolket
2 Replies

8. Shell Programming and Scripting

Need error code: rcp - reset by peer

I'm modifying a script that usese rcp. Currently the script may fail because of the "reset by peer" error message. I want to trap this in the script using a check with the $? Can anyone tell me what the error code is for the "Reset by Peer" error message when encountered by the rcp command. ... (1 Reply)
Discussion started by: jimcampanella
1 Replies

9. UNIX for Dummies Questions & Answers

Rcp

I am trying to set up RCP so root can access a few machines for file transfer. On the target machine, I have set up a .RHOSTS file that looks like: 10.33.1.59 root However when I try to use RCP to copy a file to this machine, I get permission denied. Is it possible since another user is... (1 Reply)
Discussion started by: hshapiro
1 Replies

10. Shell Programming and Scripting

rcp error trapping in rsh

I am writing a program which is something like below: rsh host1 "rcp file dest:directory" I am running this script from a machine host2. host1 has rlogin configuration for host2. but, dest machine has no rlogin configuration for host1 and fails on remote calls. Could anyone tell me how... (2 Replies)
Discussion started by: vvejendla
2 Replies
Login or Register to Ask a Question