PSCP file from Windows to Linux using private/public keys

前端 未结 1 1888
渐次进展
渐次进展 2021-01-13 02:07

I can transfer file using PSCP:

C:\\>pscp -pw  -r -p   user@Server:

B

1条回答
  •  北海茫月
    2021-01-13 02:15

    Use the following code:

    C:\>pscp -i "path\of\the\privatekey\privatekey.ppk" C:\temp\example_file.txt user@server:/path/file/to/be/stored
    

    Note the quotes for the private key path and the private key should be in .ppk format.

    The connection refused error may also be due to the wrong port. In that case, you need to mention the correct port by the following code :

    C:\>pscp -i "path\of\the\privatekey\privatekey.ppk" -P 8022 C:\temp\example_file.txt user@server:path/file/to/be/stored
    

    Note that 8022 is the port number and the P is uppercase. Hope this helps.

    0 讨论(0)
提交回复
热议问题