winscp to linux with admin privileges

dedri
dedri used Ask the Experts™
on
I have several linux systems. Normally I login on them with my account, and after I login i execute sudo -s, so I can get admin privileges.
Sometimes I need to edit some files or copy some files out of the linux systems and in the past I ofter used the winscp program.
Unfortunately when I login with winscp with my account I don't have admin privileges, and thus I am not able to open and edit needed files, I am not able to copy files out of the system. Can you tell me how to login with winscp with admin privileges
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Scott SilvaNetwork Administrator

Commented:
You would need to login with an account that has root privileges. I don't think WINSCP has any form of sudo support. Or you would need to login via SSH and use the elevated command prompt to copy the files you need in and out of your home folder, then use winscp to get them from there...
nociSoftware Engineer
Distinguished Expert 2018

Commented:
You would need to use SCP protocol with a ssh-certifcate and ONLY allow root to logon with the right certificate.
and have each user use their OWN certificate to still keep the tracking of who dit what, when..
Jr. Linux System Administrator
Commented:
If your user has sudo privileges then it is possible, use scp file protocol and from advance option SCP/shell set to "sudo su - " it will login your user as sudoer after "sudo su - " and you can edit your files
please refer this blog for details https://blog.jamesbayley.com/2014/01/28/how-to-connect-as-root-using-winscp/

Author

Commented:
I tried as it is suggested in the article above, choose the SCP protocol , and in shell settings put sudo su-, and I receive the error message: error skipping startup message. Your shell is probably incompativle with the application(BASH is recommended)
 I also tried with the sudo -s and the same message appear

Author

Commented:
i downloaded new version of winscp and now it's working. Thank you Rahul.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial