SUDO VIA WINSCP

Advertisement

rinishriju
Guest

SUDO VIA WINSCP

How to do sudo in WIN SCP??
Iam trying to copy a file from one machine to another .
When I login to that machine using ssh I use to do sudo
But how to do that in WIN SCP?

Somebody please help me out.

Thanks in advance
Rinish

Reply with quote

Advertisement

rinishriju
Guest

Hi prikryl,

Hope you understand my question.

I'll describe it again

Iam trying to copy a file from a Windows machine to a Linux Box at /opt/xxxx.
Usually I login to that machine using some ssh utility and do "sudo mkdir /opt/xxx" because iam a local user with sudo permision.
Now though Iam not directly loged into that machine Iam using WinSCP to copy my files to the linux box at the same location, but for that I have to do sudo and I dont find any option for that in WinSCP.
I would like to know if there is any option for doing sudo stuff in WinSCP ???

Thanks,
Rinish

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
33,710
Location:
Prague, Czechia

You may be able to execute the command from console as long as you do not need to enter a password. Also read this FAQ.

Reply with quote

rinishriju
Guest

Thanks for replying :)

But for Sudo, I will definetly have to enter my password :(
Is there any way to avoid this?
:D

Thanks,
Rinish.

Reply with quote

martin
Site Admin
martin avatar

SUDO typically needs terminal emulation for entering the password. WinSCP cannot techically provide this. So you have the only option, configure sudo not to ask for password.

Reply with quote

Advertisement

Guest

Thanks prikryl,

Thanks for the valuable imformation.
Any way I dont think sudo without password will work :wink:

Thanks,
Rinish.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
33,710
Location:
Prague, Czechia

Thanks for the valuable imformation.
Any way I dont think sudo without password will work :wink:
Sudo allows that.

Reply with quote

Advertisement

kpk
Guest

SUDO VIA WINSCP

What I do is another kind of work-around, to avoid sudo-without-password:
Make a directory e.g. /tmp/c with full write permissions (chmod 777).
Then you can copy contents from Windows to this folder without sudo.
Then login via ssh/ openssh/ putty and move the contents to the required directory using sudo mv ... command.

KPK

Anonymous wrote:

Thanks prikryl,

Thanks for the valuable imformation.
Any way I dont think sudo without password will work :wink:

Thanks,
Rinish.

Reply with quote

ks2k2d
Guest

Missing the big picture

There is value in the request by the original submitter and that the big picture was missed with all of the responses/suggestions.

Transferring files to remove systems is rarely done just for the sake of the transfer.
Instead, it is usually done so that the files get processed by some service.
This service has some access control and as such the files transferred need to be owned by a particular user/group.

On the other hand the remote system might not allow direct login by the target user.

At the moment one needs to set permissions of the transferred files manually after every transfer.

Maybe there should be a new feature that would allow to specify owner user/group on the remote system (maybe privileges on the remote system as well) per session. With the end result being that after each transfer the files/folders would be set with the requested permissions.

Reply with quote

Advertisement

You can post new topics in this forum