help with scp

hi all
in my script i was using the "scp" command to copy 2 files from a certain directory on server A to the same directory on another server B, but for some reason its only copying the first file in the directory. This is the frst time that i used the scp command,any ideas appreciated.

thnks

Try doing the copy in two steps, remote to local, local to remote. scp isn't too clever copying remote to remote directly.

Thanks Porter,but i didnt put the question in a right way,in the scenario i mentioned above,i'm on the serever A,pls gimme an idea

How about you show us what you are currently doing...

Are you sure you used the correct syntax, maybe a typo?

I got no problem using scp for multiple files, for example if you're in server A, in the directory where you're going to copy the files from you can use:

scp file1 file2 file3 username@serverB:/home/username

These are fairly clear instructions and examples.

I agree that scp's syntax can be a little odd at times if you're new to it.

scp