Scp: connection closed

Thanks for all guys that offer helps! I just found the solution in upper link:

Note: Since OpenSSH 8.8 the scp utility uses the SFTP protocol by default. The -O option must be used to use the legacy SCP protocol.

by using -O option and it works!

scp -O file_name target_dir

and of course you can also add an alias for it in~/.zshrc like this:

alias scp="scp -O"
1 Like