From: Michal Suchanek Date: 2006-09-07T18:12:31+09:00 Subject: Re: calling scp from ruby On 9/7/06, Jan Svitok wrote: > On 9/7/06, Jean Verger wrote: > > What I'm using when scping is: scp -r dirToCopy destination ( -r for > > recursive copy folder) > > > > but, I believe that when dirToCopy or destination is remote, you should write: > > > > USER@IP:/FOLDER/FILE > > > > in your lines I can't see the @ sign > > > > Could it be like: > > `scp -r #{sql_folder} #{remotelogin}:#{remotesqlfolder}/#{document_id}` > > `scp -r #{sql_folder} #{remoteUSER}@#{remotesIP}:/#{document_id}` scp file #{remotemachine}: is fine, it copies file to remotemachine to the home of the user with the same name (or as preconfigured in .ssh/config - you can create shortcuts for remotemachine and configure what the remote username should be). You can add /remotefolder/remotefile after the colon to change the remote location. > > > > (The OP seems to know the proper syntax, as he is able to do it by hand.) > > (I have no clue what the cause is, these are just hint what to try) > - try another file (to see whether it is dependent on some pattern in > the file, or whether it transfers the same size all the time) > - try removing few line around that line > - try using system instead of `` > - look at the logs on the remote side Try the -v switch to scp. Perhaps it will break even more but perhaps it would do the same and show useful information. Thanks Michal