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:
28,317
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.
_________________
Martin Prikryl

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
Joined:
Posts:
28,317
Location:
Prague, Czechia

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.
_________________
Martin Prikryl

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:
28,317
Location:
Prague, Czechia

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

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

Advertisement

You can post new topics in this forum