4

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@192.168.1.104

and I obtain this error:

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

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@192.168.1.104 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
6

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

scp /etc/drbd.d/r0.res root@192.168.1.104:/path/

where path/ is your desired destination on machine 192.168.1.104

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.