LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-11-2007, 11:01 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 447

Rep: Reputation: 30
rcp command from one linux to another linux server


Friends ,

I want to copy a file from one linux server to another linux server using "rcp" command .
But I got the following error :

[root@localhost test]# rcp -rp 192.168.10.2:/test/personal1 192.168.10.1:/test
192.168.10.2: Connection refused

[root@localhost test]# ping 192.168.10.1 //From Linux 1
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data.
64 bytes from 192.168.10.1: icmp_seq=1 ttl=64 time=0.324 ms
64 bytes from 192.168.10.1: icmp_seq=2 ttl=64 time=0.251 ms

--- 192.168.10.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.251/0.287/0.324/0.040 ms

[root@server ~]# ping 192.168.10.2 //from Linux 2
PING 192.168.10.2 (192.168.10.2) 56(84) bytes of data.
64 bytes from 192.168.10.2: icmp_seq=0 ttl=64 time=0.370 ms
64 bytes from 192.168.10.2: icmp_seq=1 ttl=64 time=0.317 ms
64 bytes from 192.168.10.2: icmp_seq=2 ttl=64 time=0.284 ms

--- 192.168.10.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.284/0.323/0.370/0.041 ms, pipe 2


Here i mention that I got one server to another using ping command . My first server IP is : 192.168.10.1 and another is 192.168.10.1

plz help ... ...
 
Old 12-11-2007, 11:04 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,082

Rep: Reputation: 299Reputation: 299Reputation: 299
Rcp is not installed or enabled by default, as it's pretty insecure. Unless you're on a highly trusted local network and need rcp for some particular reason, you should use scp (secure copy) instead. The semantics are the same as rcp.
 
Old 12-11-2007, 11:44 AM   #3
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Further to that btmiller said, to be able to scp to a server, that server must be running an ssh server. On Ubuntu & Debian systems, you need to install the openssh-server package. Not sue about the package name on other distros.

It is not typical for sshd to be running in most default configurations.

sshd and related programs provide an effective, secure replacement for the r-tools - rcp, rexec, rsh - and should be used in preference to them in most situations.
 
Old 12-13-2007, 01:50 AM   #4
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 447

Original Poster
Rep: Reputation: 30
Exclamation scp command without password

Thx btmiller & matthewg42 for ur answers .
Now I m using 'scp' command for transferring one file from a linux server to another remotely . It works fine like following :


[root@localhost ~]# scp -r /test/drive/ 192.168.10.1:/test/
root@192.168.10.1's password:
shi.sh 100% 43 0.0KB/s 00:00
personal1 100% 0 0.0KB/s 00:00
personal 100% 0 0.0KB/s 00:00
personal2 100% 0 0.0KB/s 00:00

But here I want a situation where 'scp' comand does not prompt for root password . I want passwordless 'scp' command , is it possible ?
Plz help me again ... ...
 
Old 12-13-2007, 05:31 AM   #5
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Yes it is possible. You need to set up public key authentication: http://sial.org/howto/openssh/publickey-auth/
 
  


Reply

Tags
rcp, rsh, ssh, sshd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ftp to Linux server using One Line command shipon_97 Linux - Newbie 3 08-28-2007 04:46 AM
How to rcp file from windows to linux sunhui Linux - Software 2 03-12-2007 12:25 AM
rcp command Karthikeyan Gurusamy Linux - Newbie 4 01-16-2006 10:19 PM
Linux - NT4 networking - RSH and RCP sijones Linux - Networking 1 06-09-2001 03:50 AM


All times are GMT -5. The time now is 02:29 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration