Link to home
Start Free TrialLog in
Avatar of patricktam
patricktam

asked on

download linux files owned by root when ssh root logon disabled

Our company has provisioned a few Redhat linux 7.x machines with root account ssh logon disabled while we can only logon as a normal user account without root privilege. Our goal is to copy some files e.g.httpd.conf owned by root from linux box to local hard disk using winscp but with download permission error.

Our question is how can we download or copy those files owned by root out of the linux box either using winscp or any other means.

thanks a lot
Patrick
SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

Not directly as Arnold says. That is why ssh for root is disabled - a security best practice.


>> any other means

Since you can logon to the server, you can ask to setup sudo rights to allow users to read the files you need.


Why would you need that httpd.conf or your local (Windows) machine anyway? Asking for the files would be another option. 

ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you have the root password to use SUDO ?  if you dont have the root password is impossible to do that you can ask the company to copy this files with crontab everyday to a folder that you are the owner and that all. backup this folder via scp
Sudo uses the user's password, not root's.
Su requires knowing root's password.

Root login is disabled on SSH.

The scheduled cooy is a variation of earlier suggestions be several others.

Usually I found when people ask how to pull data/configuration the inevitable follow up is how to push the changed config back.
Avatar of patricktam
patricktam

ASKER

Thanks for the technical advice from you guys. Will try those options.

So which of the suggestions in the selected comments above did solve your issue?

Able to mount a SMB (Windows) server share, then copy files to the SMB(Windows) share and access it from a Windows Server 2016 box. thanks

Will try other methods once available. thx