Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    How to SCP with sudo user

    Anyone please help me on this,

    please share the syntax for scp with sudo user or sudo.

    if,not kindly share alternate solution for this issue .


  2. #2
    Do you mean coping a file that root owns?

    Normally you would just specify root as the user but Ubuntu disables directly logging into root by default.
    So you can log into the machine with the files you want to copy (remotely if you have to) as a regular user and then run the following:

    ~$ sudo su
    ~$ scp /source/file user@
    ~$ exit
    that will let you become root, copy files to the machine at, and then drop root privileges

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts