Sean Hill
Sean Hill

Reputation: 1327

How do I use the right cipher with pscp.exe?

I have been using pscp to upload some files to a remote server but apparently they are updating the security so that only certain SFTP and MAC ciphers are allowed, but I'm not really a programmer so I don't know what this all entails.

Right now I have this command in a batch script (using generic capital letters here instead of the actual words/strings used):

echo y | "CURRENT_PATH\pscp.exe" -sftp -P 22 -pw "PASSWORD" "LOCAL\PATH\TO\FILE.txt" [email protected]:/SERVER/PATH/TO/FILE.txt

How do I change or update this so it is compatible with the following:

Allowed SSH Ciphers: aes256-cbc, aes256-ctr

Allowed MAC Ciphers: hmac-sha2-512, hmac-sha2-256

I don't know if I need only one or both of these SSH/MAC things to make it work.

Upvotes: 0

Views: 1091

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202474

PSCP (as any SSH client) will automatically pick the best algorithms out of those mutually supported by it and the server. There's nothing you should do.

If PSCP supports any algorithm out of those supported/allowed by the server, it will use them automatically.

If not, no configuration will fix it (except a rare case, when the best such algorithm is actually considered insecure by PSCP/PuTTY – what is not your case). All you can do, if it does not work, is to make sure you have the latest version of PSCP/PuTTY.


Obligatory warning: Never use echo y as an automated response to a pcp hostkey prompt.

Upvotes: 1

Related Questions