I am trying to use PowerShell to send a file from a Windows 10 dev box to a CentOS 7 server across a local area network.
When I run the following command from PowerShell in the Windows 10 dev box, Putty opens, but then closes before asking for password. And then the test file (index.html
) is not present in the intended destination folder on the CentOS 7 server.
Start-Process 'C:\Program Files (x86)\PuTTY\pscp.exe' -ArgumentList ("-scp -pw password C:\projects\temp\junk\index.html some_user_name@192.168.1.5:/home/some_user_name/")
How can I diagnose what problem is causing this command to fail? And what specific steps need to be taken in order for the file to be successfully transferred from the devbox to the server?
I have double checked the obvious things, like the file paths, the user name, and the IP.
The above command is derived from this suggestion by @GrahamGold.