How to: SCP command

上传文件

scp source_file_name username@destination_host:destination_folder

Verbose

scp -v somefile.txt root@192.x.x.x:.

Estimated Time

scp -p somefile.txt root@192.x.x.x:.

Use specific port

scp -P 2249 somefile.txt root@192.x.x.x:.

// Example
scp -P 2222 ./debugserver root@localhost:/usr/bin/

是大写 -P

下载文件

从 server 中拉文件到本地

scp -P 2222 -r root@localhost:/private/var/mobile/Containers/Bundle/Application/4A4375FF-83D6-471A-88AE-EDB50883871E/ .

-r 表示 recursive, 下载整个 folder.

Ref

How To: SCP Command Examples

Show Comments