小编Ted*_*Roy的帖子

是否可以允许 sshd_config chroot sftp 用户使用基于密钥的身份验证?

我正在运行 Ubuntu 12.04.1 LTS(GNU/Linux 3.2.0-30-generic x86_64)服务器,使用 OpenSSH_5.9p1 Debian-5ubuntu1,OpenSSL 1.0.1 2012 年 3 月 14 日。

我想使用 /etc/ssh/sshd_config 中的设置为 sftp 访问配置 chroot,并使用基于密钥的身份验证。

我已经按照这里的教程进行操作:http : //www.thegeekstuff.com/2012/03/chroot-sftp-setup/

该教程帮助我让 sftp 使用密码身份验证。我修改了 /etc/ssh/sshd_config 文件并复制了密钥以尝试使基于密钥的身份验证工作,但到目前为止,没有运气。

我的 /etc/ssh/sshd_config 文件的相关部分:

# Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes
# Of course, I'd like to change this to no once key-based auth is working


# Commenting for chroot use
#Subsystem sftp /usr/lib/openssh/sftp-server
Subsystem       sftp    internal-sftp

Match Group sftpusers
        ChrootDirectory /sftp/%u
        ForceCommand internal-sftp
        PubkeyAuthentication yes …
Run Code Online (Sandbox Code Playgroud)

ubuntu ssh chroot sftp

2
推荐指数
1
解决办法
7873
查看次数

标签 统计

chroot ×1

sftp ×1

ssh ×1

ubuntu ×1