Switching users using WinSCP between different accounts
There is a FAQ for this question on WinSCP site:
How do I change user after login (e.g. su root)?
You need to specify the sudo
command in WinSCP session settings, as custom shell (if you are using SCP) or use sudo
in custom SFTP server startup command (if you are using SFTP).
Though there are some limitations, notably that you need to configure sudo
not to require a password.
See the link for details.
How to run SUDO command in WinSCP to transfer files from Windows to linux
AFAIK you can't do that.
What I did at my place of work, is transfer the files to your home
(~
) folder (or really any folder that you have full permissions in, i.e chmod 777
or variants) via WinSCP, and then SSH to to your linux machine and sudo
from there to your destination folder.
Another solution would be to change permissions of the directories you are planning on uploading the files to, so your user (which is without sudo
privileges) could write to those dirs.
I would also read about WinSCP Remote Commands for further detail.
WinSCP/CuteFTP - Download files owned by another user
When you connect via Putty switch to user by using your sudo privilege. Then copy file under /tmp folder. After that you would be able to download that file via winscp/cuteFTP.
Transfer files to/from session I'm logged in with PuTTY
This is probably not a direct answer to what you're asking, but when I need to transfer files over a SSH session I use WinSCP, which is an excellent file transfer program over SCP or SFTP. Of course this assumes you're on Windows.
Related Topics
Difference Between --Cap-Add=Net_Admin and Add Capabilities in .Yml
How to Grep While Avoiding 'Too Many Arguments'
Git Clone from Linux to Tfs Git Repo
Identifying the Preferred Ipv6 Source Address for an Adapter
What Does It Take to Be Durable on Linux
How to Monitor Newly Created File in a Directory with Bash
How to Execute Multiple Commands After Sudo Command
How to Export a Modified Kernel Header
Can the Sys_Execve() System Call in the Linux Kernel Receive Both Absolute or Relative Paths
Linux - List of Registered Devices
How to Print a Number in Arm Assembly
How Can Linux Ptrace Be Unsafe or Contain a Race Condition
Linux: Instantiate from User-Space:Eeprom New_Device
Preserve Environments Vars After Shell Script Finishes
Perl: What Does Checkstack.Pl in Linux Source Do
Fatal: Git Was Built Without Support for Git-Add--Interactive (No_Perl=1)