TranslateProject/sources/tech/20190301 How to use sudo access in winSCP.md
2019-03-07 09:08:26 +08:00

2.4 KiB
Raw Blame History

How to use sudo access in winSCP

Learn how to use sudo access in winSCP with screenshots.

How to use sudo access in winSCPsudo access in winSCP

First of all you need to check where is your SFTP server binary located on server you are trying to connect with winSCP.

You can check SFTP server binary location with below command

[root@kerneltalks ~]# cat /etc/ssh/sshd_config |grep -i sftp-server
Subsystem sftp  /usr/libexec/openssh/sftp-server

Here you can see sftp server binary is located at /usr/libexec/openssh/sftp-server

Now open winSCP and click Advanced button to open up advanced settings.

winSCP advance settings winSCP advance settings

It will open up advanced setting window like one below. Here select SFTP under Environment on left hand side panel. You will be presented with option on right hand side.

Now, add SFTP server value here with command sudo su -c here as displayed in screenshot below

SFTP server setting in winSCP SFTP server setting in winSCP

So we added sudo su -c /usr/libexec/openssh/sftp-server in settings here. Now click Ok and connect to server as you normally do.

After connection you will be able to transfer files from directory where you normally need sudo permission to access.

Thats it! You logged to server using winSCP and sudo access.


via: https://kerneltalks.com/tools/how-to-use-sudo-access-in-winscp/

作者:kerneltalks 选题:lujun9972 译者:译者ID 校对:校对者ID

本文由 LCTT 原创编译,Linux中国 荣誉推出