如何在 Cyber​​Duck 上通过 SFTP 使用 sudo? [英] How to use sudo over SFTP with CyberDuck?

查看:62
本文介绍了如何在 Cyber​​Duck 上通过 SFTP 使用 sudo?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从这里复制这个问题:http://getsatisfaction.com/cyberduck/topics/can_i_use_sudo_over_sftp_with_cyberduck

I'm copying this question from over here: http://getsatisfaction.com/cyberduck/topics/can_i_use_sudo_over_sftp_with_cyberduck

我遇到了同样的问题,很难找到答案:

I am having the same issue and finding it hard to find an answer:

我通过 SFTP 使用 Cyber​​duck.我可以连接和浏览文件很好,但是当我尝试上传时,我得到一个权限错误.网络主机说我需要使用sudo"命令.我知道如何通过终端做到这一点,但它是可以告诉 Cyber​​duck 使用须藤?

I am using Cyberduck over SFTP. I can connect and browse files fine, but when I try to upload, I get a permissions error. Web host says I need to use the 'sudo' command. I know how to do this via Terminal, but it is possible to to tell Cyberduck to use sudo?

请不要告诉我使用 root 因为:

Please don't tell me to use root because:

如果您没有 root 访问权限或不想启用 root 访问权限?

What if you don't have root access or don't want to enable root access?

推荐答案

我遇到同样的问题很长时间了,我已经辞职,只使用 putty 来编辑文件,或者将它们从我的主目录中移动.

I had this same problem for a really long time, and I had resigned to simply using putty to edit files, or moving them from my home directory.

不幸的是,这只是部分答案,因为它在 linux 中本身不起作用.不过,您可能可以在葡萄酒中使用它.结果证明可以使用 winscp 来做到这一点.

Unfortunately this is only a partial answer, as it does not work natively in linux. You might be able to use it in wine though. Turns out it is possible to do this using winscp.

在 winscp 中设置一个新的 SFTP 会话,

Setup a new SFTP session in winscp,

之后,转到设置的 SFTP 部分,选择一个自定义 SFTP 服务器,然后键入远程 sftp-server 二进制文件的路径,并在其前面附加 sudo -s.为此,您需要启用无需密码即可运行 sudo.您可以在远程服务器上使用 whereis 命令来查找 sftp-server 的路径.

After that, go to the SFTP section of the setup, select a custom SFTP server, and type in the path to the remote sftp-server binary with sudo -s appended before it. For this to work you need to enable running sudo without a password. You can use the whereis command on the remote server to find the path to sftp-server.

这篇关于如何在 Cyber​​Duck 上通过 SFTP 使用 sudo?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆