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



我在alicloud上使用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

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

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

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

我用sftp试试,它有效。

在重建服务器后,我在一个Redat 8盒子上遇到了同样的问题

我运行scp-v,注意到"Sink:"显示了一条状态消息,我已将其添加到.bashrc文件中(echo"…"(

一旦我删除了echo语句,scp运行时没有出现问题

sshd_config正在强制连接到sftp,结果是(倾斜(错误。

删除该行,然后重新加载/重新启动sshd:

ForceCommand internal-sftp

我收到了这个错误,在将-v添加到scp命令后,我了解到这个错误是由我的帐户登录到远程框的次数过多引起的。

scp -v example.com:/tmp/example .
debug1: Sending command: scp -v -f /tmp/example
Sink: Too many logins for 'user1'
protocol error: mtime.sec not present

最新更新