Topic "What's behind the magic, WinSCP?"

Author Message


I have a login to a remote machine after which I need to do a passwordless "sudo su".

I've been able to set this up in WinSCP and it works beautifully. I login as jj@remote-host and then, as per the Shell setting under Environment | SCP/Shell, it immediately does: sudo su - foouser and I'm able to transfer files as foouser. Awesome!

My question is, how does WinSCP achieve this? I'm trying to do the same thing from a shell, and I always get prompted with a password for foouser.

This is what I'm trying (just id at first, plan to figure out how to actually xfer files after I get that working):

ssh jj@remote-host 'sudo su - foouser -c "id"'

I'm thinking that since WinSCP can manage it, it's not an issue with permissions on remote-host but rather me not doing it right.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26890
Location: Prague, Czechia
WinSCP does not so anything special, it just executes the command.
Martin Prikryl

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License