The UNIX and Linux Forums

The UNIX and Linux Forums (http://www.unix.com/index.php)
-   Red Hat (http://www.unix.com/red-hat/)
-   -   scp with su (http://www.unix.com/red-hat/140421-scp-su.html)

arumon 07-16-2010 07:34 AM

scp with su
 
Hi Friends,

I am trying to copy some files over the network in between my linux servers. I am using scp command for this. by default direct ssh root login is disabled on all of my linux servers. Normaly we used to login as a normal user and the su to th root user.
unfortunately root user is only having the write permission. Is there any alternative option on scp command to switch to root user before starting the copying. Please help me.

Regards,
Arumon

Corona688 07-17-2010 01:35 AM

If root login is disabled, then root login is disabled. You'll need to enable root login to enable root login.

There are other ways this could be done than scp, though. You could tunnel a tape archive into ssh, fed into tar or a script that runs tar as root via sudo. something like

Code:

tar -cf - dir1/ dir2/ file1 file2 | ssh user@host sudo tar -C remote/destination/ -xf -
Any root access is dangerous, of course. Nothing prevents you from wiping out vital system files, and if this process is exploited they will easily gain full control of the system.


All times are GMT -4. The time now is 11:43 PM.

Linux and Unix Supported by: vBulletin
Search Engine Optimisation provided by DragonByte SEO v1.1.4 (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
The UNIX and Linux Forums Content Copyright ©1993-2013. All Rights Reserved.
Forum Operations by The UNIX and Linux Forums