访问SFTP bin/bash

发布于 2024-09-16 06:02:51 字数 204 浏览 4 评论 0原文

我在 Plesk 中打开了一个域,并希望为用户提供 SFTP 访问权限,以确保通过 FTP 进行的传输安全。

当我选择“使用用户凭据 /bin/bash Shell 访问服务器”时,我收到一条消息,指出启用此功能非常危险,只有在我信任用户的情况下才应启用它。

我试图了解为用户启用 SFTP 可能会带来哪些危险。

提前致谢!

乔尔

I opened a domain in Plesk and wanted to give the user access to SFTP in order to secure the transfers through FTP.

When i chose "Shell acess to server with user's credentials /bin/bash" I got a message that it is extremely dangerous to enable this feature and I should only enable it if I trust the user.

I am trying to understand how enabling SFTP to a user can be dangerous.

Thanks in advance!

Joel

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

乖不如嘢 2024-09-23 06:02:51

好吧,我对 plesk 一无所知,但 sftp 使用 ssh 来隧道客户端和服务器之间的通信。因此,用户可以使用 ssh 访问您的服务器,并获得一个成熟的 shell 来执行一些令人讨厌的事情。如果你不注意,他可以读取其他用户的主页,或者读取你的服务器的配置。

除非您对用户进行 chroot,并进一步关注 hdd、cpu、mem...限制,否则您不应允许潜在不可信用户通过 ssh 访问您的服务器。
据我所知,如果没有完整的 ssh 访问权限,则无法允许 sftp/scp。

Well, I have no clue about plesk, but sftp uses ssh to tunnel the communication between client and server. Therefore, the user can access your server with ssh, and get a full fledged shell to do nasty stuff. If you don't pay attention he can read other users homes, or read your server's configs.

Unless you chrooted the user, and took further care about hdd, cpu, mem, ... limits, you should not allow access to your server to a potentially untrustworthy user via ssh.
To my knowledge, there is no way to allow sftp/scp without complete ssh access.

隐诗 2024-09-23 06:02:51

通常,在 Plesk 中向某人提供 shell /bin/bash(chrooted)是实现此目的的方法。就我个人而言,我不认为这是一个巨大的安全问题,但这取决于您的服务器在权限方面的锁定程度。

您还可以考虑将 proftpd 设置为使用 SSL,而不是给予他们 SFTP 访问权限,因为这不需要他们有 shell,并且他们的 shell 仍然可以是 /bin/false。

Typically giving someone the shell /bin/bash (chrooted) in Plesk is the way to accomplish this. I don't consider this to be a huge security concern, personally, but it depends on how well you have your server locked down in regards to permissions.

You can also look into setting proftpd up to use SSL rather than giving them SFTP access, as this does not require them to have a shell, and their shell can still be /bin/false.

画离情绘悲伤 2024-09-23 06:02:51

如果您只想授予用户 scp/sftp-access 权限,则可以将 shell 设置为 scponly。

在 Ubuntu 中,scponly 由 scponly 软件包提供,安装后位于 /usr/bin/scponly。

If you only want to give the user scp/sftp-access, you can set the shell to scponly.

In Ubuntu scponly is provided by the scponly package, and is located at /usr/bin/scponly after install.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文