Press "Enter" to skip to content

使用 SSH 命令行传输文件到远程服务器

上传本地文件到服务器

scp /localPath/filename username@hostPath:/serverPath/filename

上传目录到服务器

scp -r /localPath/localDir username@hostPath:/serverPath/remoteDir

从服务器上下载文件

scp username@hostPath:/serverPath/filename /localPath/filename

从服务器下载整个目录

scp -r username@hostPath:/serverPath/remoteDir /localPath/localDir
    发表回复

    您的电子邮箱地址不会被公开。 必填项已用 * 标注