LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-12-2012, 02:01 PM   #1
ratotopi
Member
 
Registered: Dec 2011
Posts: 114

Rep: Reputation: 6
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.
 
Old 10-12-2012, 07:36 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
I think I understand this. You usually log on as a limited or restricted user and then sudo to some account.
 
Old 10-13-2012, 12:41 PM   #3
ratotopi
Member
 
Registered: Dec 2011
Posts: 114

Original Poster
Rep: Reputation: 6
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
 
Old 10-13-2012, 12:44 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

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

Last edited by suicidaleggroll; 10-13-2012 at 12:47 PM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
copy existing root fs to nfs server freeindy Debian 1 03-10-2012 02:46 PM
Copy existing root fs to nfs server freeindy Linux - General 1 03-10-2012 06:04 AM
Root Account Disabled (not smart) Can not root LOGIN mitchellray Slackware 12 06-30-2009 12:52 PM
URGENT (server down) : All account disabled ! (and also root) jmcollin92 Mandriva 2 01-10-2006 03:57 PM
Copy files from my PC to server anjanesh Linux - Newbie 6 12-30-2005 12:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:00 AM.

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