本文主要是介绍wscp收到了太大的SFTP包,支持的最大包大小1024000 B,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
wscp收到了太大的SFTP包,支持的最大包大小1024000 B
我的ubuntu服务器升级了一些包后,winscp无法连到服务器,报以下错。
在网上找了好久,各种方案在我手里都不好用。比如删除 ~/.profile 和 ~/.bashrc 里所有东西,还是解决不了这个问题。
解决方案是,改一下配置文件
vim /etc/ssh/sshd_config
注释这行
#Subsystem sftp /usr/lib/openssh/sftp-server
增加一行为
Subsystem sftp internal-sftp
重启ssh服务或服务器。就解可以用winscp连了。
我从以下两个地址打到的解决方案
https://unix.stackexchange.com/questions/61580/sftp-gives-an-error-received-message-too-long-and-what-is-the-reason
https://www.zhihu.com/question/421105440
还有一个临时解决方案如下
在winscp官方找到以下文档,最后一条对我有用。
To fix the problem, find out, what command in your login script prints the text. Once you find it, move the command to a proper interactive script, or remove it entirely. The scripts are usually hidden (their name starts with dot) and are located in your home directory on the server. Typically you will need to move the commands from .bashrc script to .bash_profile.
这个英文我理解大概意思是删除.bashrc 里的注释,或将 注释移到.bash_profile 里。这个对我不好用。
There are other possible sources of the message in addition to the profile script – some SSH servers print messages, if they are unable to start an SFTP server, or encounter a fatal error. You should contact your server administrator.
这条我没理解咋解决。
Another possibility is that the server is configured to only allow an SCP protocol and not the SFTP protocol, in such a way that SCP fallback mechanism of WinSCP does not work. The solution is to explicitly choose SCP protocol on the Login dialog.
我的解决方案在这最后一条中。
the server is configured to only allow an SCP protocol and not the SFTP protocol
服务配置只允许scp协议,而不是sftp协议。
The solution is to explicitly choose SCP protocol on the Login dialog.
解决方案是选择scp协议登陆。
如下箭头处,选择scp协议,就可以正常登陆了。
这篇关于wscp收到了太大的SFTP包,支持的最大包大小1024000 B的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!