- 1 year ago
Change Kex Algorithm for pscp File Transfer from Powershell
To change the key exchange (Kex) algorithm for file transfers using pscp
(PuTTY Secure Copy) from PowerShell, you can use the -sshkex
option followed by the desired Kex algorithm.
Here's an example of how you can specify the Kex algorithm when using pscp
in PowerShell:
powershellpscp -sshkex algorithm_name source_file user@hostname:destination_path
Replace algorithm_name
with the desired Kex algorithm you want to use. You can refer to the PuTTY documentation or consult the remote server's administrator to determine the available Kex algorithms.
Replace source_file
with the local file you want to transfer, user
with the username on the remote server, hostname
with the hostname or IP address of the remote server, and destination_path
with the destination path on the remote server where you want to copy the file.
For example, if you want to use the diffie-hellman-group-exchange-sha256
Kex algorithm to transfer a local file called local_file.txt
to the remote server, the command would look like this:
powershellpscp -sshkex diffie-hellman-group-exchange-sha256 local_file.txt user@hostname:destination_path
Make sure to have PuTTY and pscp
installed on your system and properly configured before using this command. Additionally, ensure that the remote server supports the specified Kex algorithm for successful file transfer.