LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-01-2012, 11:45 PM   #1
rajes4india
Member
 
Registered: Aug 2011
Location: Germany
Posts: 35

Rep: Reputation: Disabled
Question How to scp to sudo user


Hi Floks,

what is the syntax to scp with sudo user .

Thnaks
Rajesh Kumar v
 
Old 01-01-2012, 11:51 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Could you clarify a bit? If you want to run SCP as root, then you can use sudo. If you want the file to end up on the remote machine as created by root, then you can do:

Code:
scp root@server
 
Old 01-01-2012, 11:52 PM   #3
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
There's no way to do that, exactly.

Running sudo will give you root permissions locally. Alternately, you can login as root on the remote system. E.g.:

Code:
sudo scp user@remote:/some/file .
or

Code:
scp root@remote:/some/file .
 
1 members found this post helpful.
Old 01-02-2012, 12:00 AM   #4
rajes4india
Member
 
Registered: Aug 2011
Location: Germany
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MS3FGX View Post
Could you clarify a bit? If you want to run SCP as root, then you can use sudo. If you want the file to end up on the remote machine as created by root, then you can do:

Code:
scp root@server
the problem is ,i want to scp one file to not root user say user123.

scp xyz.c user123@12.0.0.1:/home/user123/svn/xyz/


it leads to Permission denied

any possible solution to override this.

Thanks
Rajesh kumar V
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Which is safer? Only ssh +scp for 2 users? Or ssh (1 user) + vsftpd (1 virtual user) bvz Linux - Security 2 09-18-2011 08:55 PM
[SOLVED] "sudo: Can't mkdir /var/run/sudo/%user%: File exists" CNBarnes Linux - Server 7 01-10-2011 04:11 PM
unchecked link between pc user and sudo user on Mint5 how do I get it back,stop laugh Fred Caro Linux - Newbie 2 04-22-2009 08:36 PM
Gconf-editor settings not sticking for root, sudo user, or user when run sandaili Fedora 1 07-19-2008 08:31 AM
SCP with a system user dekers Linux - Networking 4 01-29-2006 12:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration