LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Need Help Urgently!!! (https://www.linuxquestions.org/questions/linux-software-2/need-help-urgently-406847/)

chinmays 01-23-2006 04:09 AM

Need Help Urgently!!!
 
I am tryng to use "scp" to copy files from one machine to the other, but i can store files on the other machine only by using the "sudo" command.
I am using the following syntax, but this gives errors:

sudo scp filename username@machine:/filename

Error: permission denied

So i try using the sudo command for the second machine

sudo scp filename sudo username@machine:/filename

Error: scp: /filename: No such file or directory

Any suggestions.

I think there is some problem with the positioning of the sudo comand

carl0ski 01-23-2006 04:33 AM

Quote:

Originally Posted by chinmays
I am tryng to use "scp" to copy files from one machine to the other, but i can store files on the other machine only by using the "sudo" command.
I am using the following syntax, but this gives errors:

sudo scp filename username@machine:/filename

Error: permission denied

So i try using the sudo command for the second machine

sudo scp filename sudo username@machine:/filename

Error: scp: /filename: No such file or directory

Any suggestions.

I think there is some problem with the positioning of the sudo comand


I hearby Boycott this Thread Based on It Annoying Subject

Bigpet 01-23-2006 04:37 AM

I also advise you to change the topic according to your problem and not according to its priority

chinmays 01-23-2006 04:43 AM

i am sorry for that.
But i cannot change the subject line by using edit option.
i will definitely appreciate ur help

reddazz 01-23-2006 05:09 AM

Your commands should be similar to the following,
Code:

$scp filename user@host:filename
or to a directory
Code:

$scp filename user@host:dirname/.
You have a forward slash in the second command which indicates the root (/) filesystem of the host you are copying the file to and not the users home dir.

As others have mentioned you thread needs to have a title that reflects the problem and not the urgency. Threads are not prioritised by how urgent they are. When someone comes along who can help you then you will get a reply.

Matir 01-23-2006 09:36 AM

To actually answer your question: scp will never invoke sudo on the remote host. To use scp, the destination must be writable but the user on the remote system.


All times are GMT -5. The time now is 02:34 PM.