Hello,
PSCP, the PuTTY Secure Copy client (for Windows), is a tool for transferring files securely between computers using an SSH connection. PSCP is a command line application.
To start PSCP it will need either to be on your PATH or in your current directory. To add the directory containing PSCP to your PATH environment variable, type into the console window:
This will only work for the lifetime of that particular console window.Code:set PATH=C:\path\to\putty\directory;%PATH%
Once you've got a console window to type into, you can just type pscp on its own to bring up a usage message. This tells you the version of PSCP you're using, and gives you a brief summary of how to use PSCP:
(PSCP's interface is much like the Unix scp command, if you're familiar with that.)Code:Z:\owendadmin>pscp PuTTY Secure Copy client Release 0.60 Usage: pscp [options] [user@]host:source target pscp [options] source [source...] [user@]host:target pscp [options] -ls [user@]host:filespec Options: -V print version information and exit -pgpfp print PGP key fingerprints and exit -p preserve file attributes -q quiet, don't show statistics -r copy directories recursively -v show verbose messages -load sessname Load settings from saved session -P port connect to specified port -l user connect with specified username -pw passw login with specified password -1 -2 force use of particular SSH protocol version -4 -6 force use of IPv4 or IPv6 -C enable compression -i key private key file for authentication -noagent disable use of Pageant -agent enable use of Pageant -batch disable all interactive prompts -unsafe allow server-side wildcards (DANGEROUS) -sftp force use of SFTP protocol -scp force use of SCP protocol
So to copy the local file c:\documents\foo.txt to the server example.com as user fred to the file /tmp/foo you would type:
Code:pscp c:\documents\foo.txt fred@example.com:/tmp/foo
You can use wildcards to transfer multiple files in either direction, like this:
You can also use public key authentication with PSCP.Code:pscp c:\documents\*.doc fred@example.com:docfiles pscp fred@example.com:source/*.c c:\source
Regards,
Silvester J.


Reply With Quote