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
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.
The sshd_config is forcing connections to sftp, and the (oblique) error is the result.
Remove this line then reload/restart sshd:
ForceCommand internal-sftp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With