I need to copy file between Linux machines. The problem that the user I use to login (myuser), is different from the user that can access the file.
If I just ssh to the machine, I can switch the user using sudo su someuser, can I do it somehow while scp?
While using WinSCP I managed to do it, by configuring the SCP/Shell, so I believe there must be a similar way to do it via pure shell.
sshand executingscp, something like this:ssh myuser@host "sudo scp ..."?