Friday, October 30, 2009

Using PuTTY Secure Copy client

Here are a few simple examples for using the PSCP command line utility for moving files between Windows and *nix over SSH. I realize it is much more capable but these are really the only reasons I use it.

Copy from *nix:
pscp.exe -2 -scp username@server.domain.loc:/home/username/*.* c:\Temp\

Copy to *nix:
pscp.exe -2 -scp c:\Temp\*.* username@server.domain.loc:/home/username/

List files and directories on *nix:
pscp.exe -2 -scp -ls username@server.domain.loc:/home/username/

If you are familiar with FTP, you can use the PSFTP.EXE tool to do the same thing as in the below example:

psftp.exe -2 -l username server.domain.loc

Once authenticated use the mget command to copy files to the local Windows computer.

No comments: