LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   remote copy file (https://www.linuxquestions.org/questions/linux-newbie-8/remote-copy-file-823832/)

elainelaw 08-03-2010 09:29 AM

remote copy file
 
I would like to use the command rcp to copy file from remote server ( linux ) to local pc , what is the command ?

the remote server name is lnx_srv , the path is /tmp/ora_file1.txt , the linux login id is ora_usr , the .rhosts have released to ora_usr
the localhost pc path is c:\Ora

I read the help page of windows , tried the command rcp lnx_srv.ora_usr:/tmp/ora_file1.txt c:\Ora , but not work , the error is "rsh: can't establish connection" , Can advise what is wrong ? what comamnd should i use ?

Thanks.

wahsape 08-03-2010 09:49 AM

This is the syntax I found for rcp.

rcp [Host][.User:] [Source] [Host][.User:] [Path\Destination]

Might want to change your c:\Ora to [computer name]\Ora

rossdav 08-03-2010 09:56 AM

try scp?
 
rcp is a pretty dated protocol; I would recommend scp, which leverages the SSH daemon that should be running on the system. It sounds like rsh is not running. With a Windows host, you will need PuTTY or Cygwin or some other program to give you SSH capabilities.

change to the directory you want to have the file placed in (Cygwin example)

cd /cygdrive/c/Ora

scp ora_user@lnx_srv:/tmp/ora_file1.txt .

Note the period at the end denoting 'current directory'. Good luck!

Quote:

Originally Posted by elainelaw (Post 4054041)
I would like to use the command rcp to copy file from remote server ( linux ) to local pc , what is the command ?

the remote server name is lnx_srv , the path is /tmp/ora_file1.txt , the linux login id is ora_usr , the .rhosts have released to ora_usr
the localhost pc path is c:\Ora

I read the help page of windows , tried the command rcp lnx_srv.ora_usr:/tmp/ora_file1.txt c:\Ora , but not work , the error is "rsh: can't establish connection" , Can advise what is wrong ? what comamnd should i use ?

Thanks.


elainelaw 08-03-2010 11:34 AM

Quote:

Originally Posted by rossdav (Post 4054089)
rcp is a pretty dated protocol; I would recommend scp, which leverages the SSH daemon that should be running on the system. It sounds like rsh is not running. With a Windows host, you will need PuTTY or Cygwin or some other program to give you SSH capabilities.

change to the directory you want to have the file placed in (Cygwin example)

cd /cygdrive/c/Ora

scp ora_user@lnx_srv:/tmp/ora_file1.txt .

Note the period at the end denoting 'current directory'. Good luck!

the scp is not available in XP , so I have to use rcp .

elainelaw 08-03-2010 11:36 AM

Quote:

Originally Posted by wahsape (Post 4054075)
This is the syntax I found for rcp.

rcp [Host][.User:] [Source] [Host][.User:] [Path\Destination]

Might want to change your c:\Ora to [computer name]\Ora

Thanks, use computer name ? I want to copy from remote server to local pc .

elainelaw 08-05-2010 06:01 AM

I also tried the below command , but still not work , can advise what is wrong ?

rcp 192.168.102.1.ora.usr:/tmp/ora_file1.txt c:\Ora



Thanks.

michaelk 08-05-2010 06:42 AM

If you are able to download applications to that particular PC there are many scp clients both GUI and command line. Here is one of each.
http://www.chiark.greenend.org.uk/~s.../download.html
http://winscp.net/eng/download.php

Typically rshd runs from xinetd. The service has to enabled as well as xinetd started. A can't establish connection error could be due to several problems. Is the service running? Does the firewall if enabled allow rsh traffic? Are the hosts.allow, hosts.deny files configured correctly.

chrism01 08-05-2010 06:46 AM

Taking wahsape's word for the syntax
Code:


rcp 192.168.102.1.ora_usr:/tmp/ora_file1.txt .

if you are running this cmd on the XP system. note you said the username had an underscore, not dot in the middle.
'.' at the end there means put the file 'here' ie current dir.
Looking at your orig error I'd surmise that the rsh/rcp daemon is not running on the lx system, which would be normal. It's a plaintext protocol and as such highly insecure.
If you've got putty on the XP system you can use pscp (Putty implementation of scp; recommended).
If you insist on using rcp, you'll have to install the daemon with your pkg mgr.
Please specify your linux distro and/or add it to your profile so we can help you.
iirc, rcp/rsh usually runs under the xinetd super-daemon.

elainelaw 08-05-2010 10:28 AM

Thanks reply ,

I want to try rcp first , for my case , I can rcp between linux servers , but can use in between XP and linux , can advise what is wrong ? thx

alli_yas 08-05-2010 10:33 AM

As per post #7 - download and install WinSCP - its free and secure. It will achieve what you want in terms of copying data between Win XP and Linux; as well as between Linux servers; via the Win XP machine.

Also you won't need to worry about syntax and so forth as its completely GUI based.


All times are GMT -5. The time now is 10:28 PM.