嗨我可以使用我自己的用户名使用WinSCP登录GCE VM,无法以root用户身份登录…默认情况下根据谷歌,可以更改.
改变如下:
第1步:登录SSH和Su Root
# sudo su root
第2步:更改密码Root
#passwd root
第3步:配置SSHD允许Root登录
#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)
试图通过WinSCP以root身份登录但是我得到了
“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?”
有任何想法吗?
解决方法
收到太大的SFTP数据包.支持的最大数据包大小为102400 B.
原因:
当.bashrc文件将数据打印到屏幕时(例如,archey,screenfetch),可能会出现此问题.每次初始化任何控制台shell时都会运行.bashrc文件.
解:只需将生成.bashrc文件输出的脚本移动到.bash_profile即可. .bash_profile仅在您创建物理shell会话时运行.