SCP Connection closed error
SCP Connection closed error
SCP Connection closed error
Error 1:
Fix:
- Find ~/.bashrc or /etc/bash.bashrc
- Remove any command that displays output, ie, echo, cat, etc
Error 2:
Fix:
- Add -O option into scp:
1
scp -O -P 2200 n.reed@10.102.69.197:/tmp/sec.txt .
Explained here:
TL:DR - 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.
And in this case, the target is using OpenSSH 8.2:
This post is licensed under CC BY 4.0 by the author.