获取“接收到太大的 SFTP 数据包"使用 WinSCP 以 Root 身份登录到 Google Compute Engine 虚拟机实例时 [英] Getting "Received too large SFTP packet" when logging in with Root using WinSCP to Google Compute Engine virtual machine instance

查看:244
本文介绍了获取“接收到太大的 SFTP 数据包"使用 WinSCP 以 Root 身份登录到 Google Compute Engine 虚拟机实例时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我可以使用自己的用户名通过 WinSCP 登录 GCE VM,但无法以 root 身份登录...这是 Google 的默认设置,可以更改.

改成这样:

第一步:登录SSH和Su Root

# sudo su root

第 2 步:更改密码 Root

#passwd root

第 3 步:配置 SSHD 允许 Root 登录

#nano/etc/ssh/sshd_configPermitRootLogin 是密码认证是#service sshd restart(我使用 ssh,因为我使用的是 ubuntu 而 sshd 不起作用)

试图通过 WinSCP 以 root 身份登录,但我得到 <块引用>

"接收到太大 (1349281121 B) SFTP 数据包.支持的最大数据包大小为 1024000 B.错误通常是由打印的消息引起的从启动脚本(如.profile).该消息可能以'请求'."无法初始化 SFTP 协议.主机是否运行 SFTP服务器?"

有什么想法吗?

解决方案

嗯,我在 WinSCP 的协议选项"下的高级设置中添加了这个:须藤/usr/lib/openssh/sftp-servers

我现在可以使用自己的用户名登录并移动文件.虽然不完全确定这是如何工作的,但我认为它以某种方式将您更改为登录时的 root 用户?

更多信息:https://winscp.net/eng/docs/faq_su>

Hi I can login to the GCE VM with WinSCP using my own username, cannot login as root...this is by default according to Google, and can be changed.

Changed like this:

Step 1: Login SSH and Su Root

# sudo su root

Step 2: Change password Root

#passwd root

Step 3: Config SSHD allow Root login

#nano /etc/ssh/sshd_config
PermitRootLogin yes
PasswordAuthentication yes

#service sshd restart (I used ssh as I'm using ubuntu and sshd wouldn't work)

Tried to login as root via WinSCP but I get

"Received too large (1349281121 B) SFTP packet. Max supported packet size is 1024000 B. The error is typically caused by message printed from startup script (like .profile). The message may start with 'Plea'." Cannot initialize SFTP protocol. Is the host running a SFTP server?"

Any ideas?

解决方案

Hmmm, I added this in WinSCP in advanced settings under "protocol options": sudo /usr/lib/openssh/sftp-servers

I can login with my own username and move files now. Although not exactly sure how this works, I think it somehow changes you to root user at login?

More info: https://winscp.net/eng/docs/faq_su

这篇关于获取“接收到太大的 SFTP 数据包"使用 WinSCP 以 Root 身份登录到 Google Compute Engine 虚拟机实例时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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