restrict ssh root login / allow root to rsync

Is there a way to restrict root login via ssh but allow root to rsync from another box?
mw-hostingAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

donciakasCommented:
You can restrict root to login directly - first login with user, then use "su" command to become root and do everything You need. Also i would suggest connecting to ssh while using RSA keys, which is more secure connection.
Here is a link how to do this on ubuntu (it is basically the same for all distros):
https://help.ubuntu.com/community/SSH/OpenSSH/Keys

P.s. also You can restrict access to ssh service from IP's You want by configuring Your firewall

Good Luck!
0
donciakasCommented:
forgot to mention the link for permitting direct root access
http://www.howtogeek.com/howto/linux/security-tip-disable-root-ssh-login-on-linux/
0
woolmilkporcCommented:
Hi,
you could add
PermitRootLogin forced-commands-only
to sshd_config.
This way root login with public key authentication will be allowed, but only if the command option has been specified, allowing for e.g. rsync but not a shell login.
wmp
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.