使用sshd 连接,sftp上传文件出现 failed to open a secure file transfer session错误提示

系统:Centos 5.2
1、使用sshd 连接,sftp上传文件出现 failed to open a secure file transfer session错误提示
vi /etc/ssh/sshd_configshift+G跳转到文件尾
Subsystem sftp /usr/libexec/sftp-server #发现这里的路径不对
/usr/libexec/目录下没有sftp-server文件,将其修改为正确的sftp-server路径
Subsystem sftp /usr/libexec/openssh/sftp-server

2、重启sshd服务
/etc/init.d/sshd restart
3、从新使用sshd连接,在使用sftp上传文件,OK问题解决了
------------------------------------------------------------------------------------------------------------------
使用ssh在Centos 5.2的发行版上,上传文件出现问题,是因为系统设置了最大session是1所以无法登陆。
[root@localhost ~]# vi /etc/ssh/sshd_config
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# ForceCommand cvs server
#MaxAuthTries 1
#MaxSessions 1注释掉这行之后可以正常使用ssh上传文件了
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值