Results 1 to 2 of 2
Hi,
Anyone please help me on this,
please share the syntax for scp with sudo user or sudo.
if,not kindly share alternate solution for this issue .
Thanks
Rajesh...
- 01-02-2012 #1Just Joined!
- Join Date
- Aug 2011
- Posts
- 4
How to SCP with sudo user
Hi,
Anyone please help me on this,
please share the syntax for scp with sudo user or sudo.
if,not kindly share alternate solution for this issue .
Thanks
Rajesh
- 01-03-2012 #2Just Joined!
- Join Date
- Mar 2011
- Location
- pittsburgh
- Posts
- 44
Do you mean coping a file that root owns?
Normally you would just specify root as the user but Ubuntu disables directly logging into root by default.
So you can log into the machine with the files you want to copy (remotely if you have to) as a regular user and then run the following:
that will let you become root, copy files to the machine at 10.0.0.2, and then drop root privilegesCode:~$ sudo su ~$ scp /source/file user@10.0.0.2:/my/destination ~$ exit


Reply With Quote