I am having trouble copying files from a remote server using SSH. Using PuTTY I log in to the server using SSH. Once I find the file I would like to copy over to my computer, I use the command:
If your local OS is Windows ,then you should usepscp.exeutility. For example, below command will download file.txt from remote toD:disk of local machine.
It seems your Local OS is Unix, so try the former one.
For those who don't know whatpscp.exeis and don't know where it is, you can always go toputtyofficial websiteto download it. And then open a CMD prompt, go to the pscp.exe directory where you put it. Then execute the command as provided above
My local OS is Windows. I downloaded the pscp.exe from the putty website. I tried opening it up and nothing came up. Also, I tried the command you listed above and was given: pscp.exe comman not found. Also tried it without the .exe and resulted in the same error.– VincentMay 31 '15 at 3:57
2
Open a CMD prompt, and go to the pscp.exe directory where you put it. Then execute the command as provided above.– mainframerMay 31 '15 at 4:01
1
using scp on a mac has to be provided ./ parameter to signify that the file has to be downloaded in the current folder on mac machine.– Sarang ManjrekarJul 2 '18 at 11:11
2
With Windows Subsystem for Linux (WSL, basically Ubuntu on Windows) you can now also open up Bash if your Local OS is Windows, and just use scp. Pro-tip: you can access your Windows file system from WSL. It's under /mnt/c. So you can do something like this:scp username@remoteHost:/remote/dir/file.txt /mnt/c– gijswijsApr 25 '19 at 3:42
3
As of the 2018 Autumn update, Windows 10 now comes with OpenSSH and is on PATH. This means you can use thescpcommand on Windows 10, too.– jauntSep 23 '19 at 20:45