info > scp(1)

📝 NAME

scp -- OpenSSH secure file copy

🚀 Quick Reference

Use CaseCommandDescription
📤 Copy file to remote hostscp file.txt user@host:/path/Copy local file to remote directory
📥 Copy file from remote hostscp user@host:file.txt .Copy remote file to current directory
💼 Copy directory recursivelyscp -r dir/ user@host:/path/Recursively copy entire directory
🔐 Use specific identity filescp -i ~/.ssh/id_rsa file.txt user@host:Authenticate with private key
🌐 Copy between two remote hosts via localscp -3 user1@host1:file.txt user2@host2:Transfer through local machine
⚡ Enable compressionscp -C file.txt user@host:Compress data during transfer
🔇 Quiet modescp -q file.txt user@host:Suppress progress meter and warnings
📊 Limit bandwidthscp -l 1000 file.txt user@host:Limit to 1000 Kbit/s
🕐 Preserve timestampsscp -p file.txt user@host:Keep modification/access times and mode

📋 SYNOPSIS

scp [-346ABCOpqRrsTv] [-c cipher] [-D sftp_server_path] [-F ssh_config]
    [-i identity_file] [-J destination] [-l limit] [-o ssh_option]
    [-P port] [-S program] source ... target

📖 DESCRIPTION

scp copies files between hosts on a network.

It uses ssh(1) for data transfer, and uses the same authentication and provides the same security as a login session.

scp will ask for passwords or passphrases if they are needed for authentication.

The source and target may be specified as a local pathname, a remote host with optional path in the form [user@]host:[path], or a URI in the form scp://[user@]host[:port][/path]. Local file names can be made explicit using absolute or relative pathnames to avoid scp treating file names containing ':' as host specifiers.

When copying between two remote hosts, if the URI format is used, a port cannot be specified on the target if the -R option is used.

The options are as follows:

The following options can be passed via -o:

🚪 Exit Codes

The scp utility exits 0 on success, and >0 if an error occurs.

🔗 SEE ALSO

sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), ssh_config(5), sftp-server(8), sshd(8)

📜 HISTORY

scp is based on the rcp program in BSD source code from the Regents of the University of California.

👤 AUTHORS

Timo Rinne <tri AT iki.fi>
Tatu Ylonen <ylo AT cs.fi>

⚠️ CAVEATS

The original SCP protocol (used by default) requires execution of the remote user's shell to perform glob(3) pattern matching. This requires careful quoting of any characters that have special meaning to the remote shell, such as quote characters.

scp(1)
📝 NAME 🚀 Quick Reference 📋 SYNOPSIS 📖 DESCRIPTION 🚪 Exit Codes 🔗 SEE ALSO 📜 HISTORY 👤 AUTHORS ⚠️ CAVEATS

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-05 22:54 @216.73.216.192
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format

^_top_^