How to run rsync via sudo at the remote source server

Solution Verified - Updated -

Issue

  • When using rsync, I want to connect to a regular user on a remote server
    and copy files as root.

    $ rsync -av USER@SERVER:SRCPATH DESTPATH
    
  • Is it possible to run rsync via sudo at the remote source server?

Environment

  • Red Hat Enterprise Linux
  • rsync

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content