I am trying to use scp command to copy the r0.res file from local machine to a remote machine. I entered the following command:

scp -v /etc/drbd.d/r0.res root@

and I obtain this error:

cp '--' '/etc/drbd.d/r0.res' 'root@'

What could cause the command to fail? Many thanks.

P.S.: I have established ssh connection between the machine and I tested it out by creating the drbd.d folder on destination like this:

sudo ssh root@ sudo mkdir -p /etc/drbd.d
  • It looks like you typed cp instead of scp. Are you ABSOLUTELY SURE you typed scp? What does type scp show? – Gilles Mar 21 '15 at 22:50

You are copying localy with your command, you create file 'root@', you should run:

scp /etc/drbd.d/r0.res root@

where path/ is your desired destination on machine

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.