LinuxCommandLibrary

pscp

TLDR

Copy file to remote

$ pscp [file] [user]@[host]:[path]
copy
Copy from remote
$ pscp [user]@[host]:[file] [local_path]
copy
Copy directory recursively
$ pscp -r [directory] [user]@[host]:[path]
copy
Use specific key
$ pscp -i [key.ppk] [file] [user]@[host]:[path]
copy

SYNOPSIS

pscp [options] [source] [destination]

DESCRIPTION

pscp is PuTTY's SCP (Secure Copy) client for Windows. It transfers files over SSH, similar to the Unix scp command but using PuTTY's connection code.

PARAMETERS

-r

Copy directories recursively.
-i key
Private key file (PPK format).
-P port
SSH port.
-l user
Login username.
-pw password
Password (insecure).
-q
Quiet mode.
-v
Verbose mode.

EXAMPLES

$ # Upload file
pscp file.txt user@server:/home/user/

# Download file
pscp user@server:/home/user/file.txt .

# Recursive directory
pscp -r project/ user@server:/var/www/

# With key authentication
pscp -i mykey.ppk file.txt user@server:

# Non-standard port
pscp -P 2222 file.txt user@server:

# Multiple files
pscp *.txt user@server:/backup/
copy

CAVEATS

Windows-specific (part of PuTTY). Uses PPK key format. On Unix, use scp instead.

HISTORY

pscp is part of PuTTY, the SSH client suite for Windows created by Simon Tatham in 1999.

SEE ALSO

scp(1), putty(1), psftp(1), plink(1)

Copied to clipboard