首页 > 解决方案 > 协议错误:尝试将文件夹/文件从远程服务器传输到本地时,mtime.sec 不存在

问题描述

我在阿里云上使用 Ubuntu 20,尝试使用 cl 从 sftp 远程服务器复制到本地时遇到问题:

scp -r -P 22 sftpibas@localhost:/sftpibas dev

但它提出了

protocol error: mtime.sec not present

如果你想在这里查看我的配置,我附上我的 sshd_config:

Include /etc/ssh/sshd_config.d/*.conf

PermitRootLogin yes

ChallengeResponseAuthentication no

UsePAM yes

PrintMotd no

AcceptEnv LANG LC_*

Subsystem       sftp    /usr/lib/openssh/sftp-server

Match group sftp
ChrootDirectory /home
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp

我将文件从远程服务器复制到本地的方法是否错误?欢迎任何建议

标签: ubuntuunixcloudremote-server

解决方案


我试图运行 scp -v。这给了我更多信息:

Sink: This service allows sftp connections only.
protocol error: mtime.sec not present

我用 sftp 试试它。


推荐阅读