LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-17-2008, 03:50 AM   #1
deepika5
LQ Newbie
 
Registered: Apr 2008
Posts: 16

Rep: Reputation: 0
Question how to copy folder between machines


how to copy a folder from one machine to another without it asking for password. im doing 'scp' but it asks for password.
how to disable password or any other command to copy files between machines without asking for password??
 
Old 04-17-2008, 03:53 AM   #2
bhaslinux
Member
 
Registered: Oct 2003
Location: UnitedKingdom
Distribution: Debian Bullseye
Posts: 357

Rep: Reputation: 49
scp is secure copy and works on top of ssh (ssl)
if you want to bypass the password checking, then it has to be done per client basis
pl. follow this site for futher help:
http://www.petefreitag.com/item/532.cfm

The instructions will work for ssh and scp.
 
Old 04-17-2008, 04:00 AM   #3
deepika5
LQ Newbie
 
Registered: Apr 2008
Posts: 16

Original Poster
Rep: Reputation: 0
can u plz tell how to use 'rcp' to copy foder frm 1 machine to another. do it also asks for password??
 
Old 04-17-2008, 04:22 AM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Youd can use mechanisms such as rsync with keys to bypass passwords, or you could export a directory on one machien and mount it with nfs on the other.

Some idea of what you are trying to achieve would help.
 
Old 04-17-2008, 04:23 AM   #5
yongitz
Member
 
Registered: Nov 2005
Location: Davao City, Philippines
Distribution: RHEL, CentOS, Ubuntu, Mint
Posts: 139

Rep: Reputation: 20
Why opt for rcp? It has been replaced by the ssh-based utility called scp. Follow the link provided by bhaslinux for setting up public key for ssh's use and you're good to go. If you've got any issues then post back.

Last edited by yongitz; 04-17-2008 at 04:25 AM.
 
Old 04-17-2008, 04:42 AM   #6
deepika5
LQ Newbie
 
Registered: Apr 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Unhappy

im making client server application in which on request frm client, server will copy required folder on client machine. scp asks for password and if I set key, i think it has to be done per client basis, which is not feasible when there are n number of clients. so wanted to know some other way to do it...
 
Old 04-17-2008, 04:46 AM   #7
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You can probably do this pretty simply with rsync if you specify a module on the remote machine. I do this the other way (in sending stuff to the remote machine). Let me try it quickly and I'll post back
 
Old 04-17-2008, 05:00 AM   #8
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You need to read up on this a bit yourself as it's quite some time since I set this up, and it's between two fully secure machines sitting next to each other, etc. etc.

On the remote machine, I have /etc/rsyncd.conf with

Code:
[storage]
path = /storage
use chroot = no
read only = no
uid = root
gid = root
The remote machine has the rsync daemon running

On the the local machine, I can

Code:
rsync -avt remote_machine_name::storage/somedir/somefile ./
to copy somefile to current directory.

In rsync parlance, storage is a module. Access rights, etc are defined in the conf and hence does not need a password.

You get all the benefits of rsync - ability to only copy changed files, etc., without the password hassle.


Hope that helps


NOTE read man rsync and man ryncd.conf

Last edited by billymayday; 04-17-2008 at 05:02 AM.
 
Old 04-17-2008, 07:08 AM   #9
deepika5
LQ Newbie
 
Registered: Apr 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Question

im not finding rsyncd.conf in /etc/ directory...

how to get it???
 
Old 04-17-2008, 07:51 AM   #10
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Create one

As I said, read man rsyncd.conf. That means type "man rsyncd.conf" at the terminal prompt
 
Old 04-18-2008, 01:58 AM   #11
deepika5
LQ Newbie
 
Registered: Apr 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Question

hey do u mean that i have to have rsyncd.conf file on each client machine
 
Old 04-18-2008, 02:06 AM   #12
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Yes - but it may even be the same one if the directory structure is the same
 
Old 04-18-2008, 02:36 AM   #13
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 924

Rep: Reputation: 43
Code:
scp -r local_folder user_name@ip_of_remote_machine:/home/dir
 
Old 04-18-2008, 03:33 AM   #14
deepika5
LQ Newbie
 
Registered: Apr 2008
Posts: 16

Original Poster
Rep: Reputation: 0
isnt there any other way out rather than requiring to configure each client machine?????????..
i want 2 send folder to any client who sends request for it.
 
Old 04-18-2008, 03:42 AM   #15
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
If what you are calling the client is requesting something, it isn't the client. The rsyncd.conf needs to be on the remote machine - the one not running the actual request
 
  


Reply


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
Easy Way to copy machines? POST HERE!! richinsc Debian 8 02-17-2008 11:19 PM
Copy a folder to USB Aerolinux Linux - Hardware 3 02-22-2007 10:00 AM
How do I copy files from a linux machine to a Windows machines? hello321_1999 Linux - Software 11 05-15-2006 01:58 PM
Copy Files across two machines. abhijeetudas Linux - Security 6 04-25-2005 03:50 AM
Need to copy OS + hard drive contents between two machines with different hardware. tayo Linux - Newbie 12 07-24-2004 10:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:30 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration