LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to copy files from server to server with root login disabled ? (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-copy-files-from-server-to-server-with-root-login-disabled-4175431901/)

ratotopi 10-12-2012 03:01 PM

how to copy files from server to server with root login disabled ?
 
I need to copy files inside the /root/ from one server to another with PermitRootLogin set to no in sshd_config and all the vc and tty in /etc/securetty disabled. Did lots of googling and couldn't find the solution. Thank you for your help.

jefro 10-12-2012 08:36 PM

I think I understand this. You usually log on as a limited or restricted user and then sudo to some account.

ratotopi 10-13-2012 01:41 PM

no i don't login as limited or restricted user. I have root password but still i cannot copy files inside /root/ folder as PermitRootLogin is set to no in sshd_config and all the vc and tty in /etc/securetty disabled. So how do i copy files inside /root/ with this parameter set in sshd_config and /etc/securetty.Thank you

suicidaleggroll 10-13-2012 01:44 PM

Do it in two steps.

As root on machineA, copy the files from /root/ to user@machineB:/tmp/ (make sure the permissions are set to x00 if you want to keep other users on machineB from reading the file)
As root on machineB, move the files from /tmp/ to /root/

You could also temporarily enable root login, copy the file over, then disable it again.


All times are GMT -5. The time now is 04:57 PM.