SFTP错误“接收到的消息太长" [英] SFTP error "Received message too long"

查看:493
本文介绍了SFTP错误“接收到的消息太长"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近尝试使用sftp访问我的Linux机器,在那里我实现了自己的简单外壳.并且我设置了除root用户以外的其他用户默认使用我的shell(通过编辑/etc/passwd文件).然后问题出现了,一旦我尝试通过sftp访问,我将收到一条消息收到的消息太长:",我搜索了解决方案,一种解决方案是将该用户的默认shell改回普通bash shell.我试过了,而且奏效了,问题在于,有没有办法我仍然可以使用自己的shell并允许sftp通过?请为我提供更多详细信息,例如我应该编辑哪个文件等.在此先感谢:)

I recently tried to using sftp to access my linux box where I implement a simple shell of my own. And I set the users except root to use mine shell in default(by editing /etc/passwd file). Then problem arise, once I tried to access through sftp, I will receive a message saying "Received message too long:", I searched for the solutions and one solution is to change the default shell for this user back to normal bash shell. I tried so and it worked, the problem is that is there a way that I can still using my own shell and also allow sftp to go through? Please answer me with more details like which file I should go editing, etc. Thanks in advance:)

推荐答案

配置服务器以使用内部sftp服务器,向/etc/ssh/sshd_config添加以下指令:

Configure your server to use the internal sftp server adding the following directive to /etc/ssh/sshd_config:

Subsystem sftp internal-sftp

那样,它将不会使用用户外壳程序来启动sftp服务器程序.

That way, it will not use the user shell to launch the sftp server program.

这篇关于SFTP错误“接收到的消息太长"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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