网络与传输CLI Manual
$scp
Securely copy files and directories between hosts over SSH connection.
命令语法POSIX Standard
scp [OPTIONS] SOURCE DEST在交互式终端沙盒中实时运行
无需安装的客户端实时仿真环境。
bash — terminal
AST Sandbox (Free)
概述与工作原理
`scp` (Secure Copy Protocol) transfers files securely between a local host and a remote host, or between two remote servers, using the same authentication and encryption as SSH.
常用参数与选项说明
| Flag / Option | Description |
|---|---|
| -r | Recursively copy entire directories. |
| -P [port] | Specify port to connect to on the remote host. |
| -i [keyfile] | Identity file for SSH private key authentication. |
实际生产案例与代码范例
#1Copy a local file to remote server
scp notes.txt user@remote-server:/home/user/docs/Uploads notes.txt to the remote server directory over SSH.
相关 Linux 常用命令
$cp文件操作
Copy files and directories to a destination path.
$curl网络与传输
通过 HTTP、HTTPS、FTP 和 REST API 在网络服务器之间传输数据。
$wget网络与传输
Non-interactive network downloader for HTTP, HTTPS, and FTP.
$ping网络与传输
Send ICMP ECHO_REQUEST to network hosts to test connectivity and latency.
$netstat网络与传输
Print network connections, routing tables, interface statistics, and listening ports.
$ssh网络与传输
Securely log into remote Linux servers and execute commands over encrypted connections.