找回密码
 立即注册
查看: 132|回复: 2

装了debian12奇怪问题

[复制链接]

1895

主题

0

回帖

1895

积分

金牌会员

积分
1895
发表于 2023-6-17 22:02:47 | 显示全部楼层 |阅读模式
ssh可以登录,
sftp不行,报错 error #7 (自己断链接了)

有大佬知道是啥问题吗?纯ssh登录{:2_32:}

------ 搜索一个 ,尝试但无效 ------
ssh 可以登录但是 sftp 不能登录的解决办法
将 /etc/ssh/sshd_config 中的

Subsystem      sftp    /usr/libexec/openssh/sftp-server
改为
Subsystem       sftp    internal-sftp

重启sshd后,sftp正常工作了
------ 搜索一个 ,尝试但无效 ------
回复

使用道具 举报

0

主题

964

回帖

0

积分

新手上路

积分
0
发表于 2023-6-17 22:10:12 | 显示全部楼层
apt-get update && apt-get -y install openssh-sftp-server

然后将你改的东西改回去,再重启sshd
回复 支持 反对

使用道具 举报

0

主题

940

回帖

0

积分

新手上路

积分
0
发表于 2023-6-17 22:14:55 | 显示全部楼层
看了其他资料,问题应该是“openssh/sftp-server”路径问题

我在/usr/libexec/下找不到 openssh 文件夹,但安装 openssh-sftp-server 提示已经是最新版

=====
root@debian:~# cd /usr/libexec/openssh/sftp-server
-bash: cd: /usr/libexec/openssh/sftp-server: No such file or directory
root@debian:~# cd /usr/libexec/sftp-server
-bash: cd: /usr/libexec/sftp-server: No such file or directory

root@debian:/usr/libexec# ls
coreutils  dpkg
root@debian:/usr/libexec#

=====
root@debian:/usr/libx32# apt-get update && apt-get -y install openssh-sftp-server
Hit:1 http://deb.debian.org/debian bookworm InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
openssh-sftp-server is already the newest version (1:9.2p1-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|翻墙党

GMT+8, 2026-9-26 07:17 , Processed in 0.078077 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表