What's behind the magic, WinSCP?

Advertisement

jj33
Guest

What's behind the magic, WinSCP?

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: What's behind the magic, WinSCP?

WinSCP does not so anything special, it just executes the command.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum