LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   how to copy folder between machines (https://www.linuxquestions.org/questions/linux-networking-3/how-to-copy-folder-between-machines-635921/)

deepika5 04-17-2008 03:50 AM

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??

bhaslinux 04-17-2008 03:53 AM

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.

deepika5 04-17-2008 04:00 AM

can u plz tell how to use 'rcp' to copy foder frm 1 machine to another. do it also asks for password??

billymayday 04-17-2008 04:22 AM

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.

yongitz 04-17-2008 04:23 AM

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.

deepika5 04-17-2008 04:42 AM

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...

billymayday 04-17-2008 04:46 AM

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

billymayday 04-17-2008 05:00 AM

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

deepika5 04-17-2008 07:08 AM

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

how to get it???

billymayday 04-17-2008 07:51 AM

Create one

As I said, read man rsyncd.conf. That means type "man rsyncd.conf" at the terminal prompt

deepika5 04-18-2008 01:58 AM

hey do u mean that i have to have rsyncd.conf file on each client machine

billymayday 04-18-2008 02:06 AM

Yes - but it may even be the same one if the directory structure is the same

czezz 04-18-2008 02:36 AM

Code:

scp -r local_folder user_name@ip_of_remote_machine:/home/dir

deepika5 04-18-2008 03:33 AM

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.

billymayday 04-18-2008 03:42 AM

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


All times are GMT -5. The time now is 04:21 PM.