Got this error today while using PSCP. I was attempting to move a file from my local computer to a remote server that allows only SCP Transfer Protocol. This was the command I was using:
pscp SampleProject\target\SampleProject.war firstname.lastname@example.org:/tmp
Digging a little bit into the issue, I found that since I intend to use SCP Transfer Protocol to transfer the file to the remote server, I need to explicitly specify the SCP protocol. I changed my command to the one below, and it worked like charm.
pscp -scp SampleProject\target\SampleProject.war email@example.com:/tmp
Please note the ‘-scp’ in the command. This ‘-scp’ forces the PSCP to use the SCP Transfer Protocol. If not specified explicitly, the PSCP will attempt to use the SFTP Protocol by default.