LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-23-2006, 04:09 AM   #1
chinmays
Member
 
Registered: Jan 2006
Posts: 37

Rep: Reputation: 15
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
 
Old 01-23-2006, 04:33 AM   #2
carl0ski
Member
 
Registered: Sep 2004
Location: Melbourne, Victoria Australia
Distribution: Support those that support you :)
Posts: 872
Blog Entries: 12

Rep: Reputation: 30
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
 
Old 01-23-2006, 04:37 AM   #3
Bigpet
LQ Newbie
 
Registered: Jan 2006
Posts: 12

Rep: Reputation: 0
I also advise you to change the topic according to your problem and not according to its priority
 
Old 01-23-2006, 04:43 AM   #4
chinmays
Member
 
Registered: Jan 2006
Posts: 37

Original Poster
Rep: Reputation: 15
i am sorry for that.
But i cannot change the subject line by using edit option.
i will definitely appreciate ur help
 
Old 01-23-2006, 05:09 AM   #5
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
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.

Last edited by reddazz; 01-23-2006 at 12:28 PM.
 
Old 01-23-2006, 09:36 AM   #6
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me Urgently cherukumilli Linux - General 3 12-29-2004 12:17 PM
Somebody urgently help me !!! apache *BSD 2 07-21-2004 07:01 AM
Help urgently PLEASE???? timmy_laf Linux - General 5 01-08-2004 04:55 AM
Need Help Urgently andrewt Linux - Software 4 08-07-2003 02:57 PM
Need help urgently Thomas.P Linux - Newbie 2 05-30-2001 01:43 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration