一、ssh上传文件

scp file username@hostIP:source-file
例:
scp test.sql [email protected]:/var/www/16bing
然后输入你服务器的 ssh 登陆密码,等待进度条,上传完成。

二、ssh下载文件

scp username@hostIP:source-file-dir target-dir
例:
scp [email protected]:/var/www/16bing/test.sql /Users/coldice/Desktop
然后输入你服务器的 ssh 登陆密码,等待进度条,下载完成。