Search code examples
ubuntuunixcloudremote-server

protocol error: mtime.sec not present when tried to transfer folder/file from remote server to local


I am using Ubuntu 20 on alicloud and I have an issue when trying to copy from sftp remote server to local using cl:

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

but it raised

protocol error: mtime.sec not present

If you want to look into my config here I attach my 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

Is my method to copy the files from the remote server to local wrong? Any suggestions are welcome


Solution

  • I tried to run scp -v. That gave me a bit more information:

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

    And I try it with sftp it works.