看起来您正在尝试使用该命令复制到本地计算机。
一个示例 scp 看起来更像下面的命令:
将文件“foobar.txt”从本地主机复制到远程主机
$ scp foobar.txt your_username@remotehost.edu:/some/remote/directory
scp "the_file" your_username@the_remote_host:the/path/to/the/directory
发送目录:
将目录“foo”从本地主机复制到远程主机的目录“bar”
$ scp -r foo your_username@remotehost.edu:/some/remote/directory/bar
scp -r "the_directory_to_copy" your_username@the_remote_host:the/path/to/the/directory/to/copy/to
并从远程主机复制到本地:
将文件“foobar.txt”从远程主机复制到本地主机
$ scp your_username@remotehost.edu:foobar.txt /your/local/directory
scp your_username@the_remote_host:the_file /your/local/directory
并包括端口号:
将文件“foobar.txt”从远程主机的8080端口复制到本地主机
$ scp -P 8080 your_username@remotehost.edu:foobar.txt /your/local/directory
scp -P port_number your_username@the_remote_host:the_file /your/local/directory
使用putty从windows机器到linux机器
pscp -r <directory_to_copy> username@remotehost:/path/to/directory/on/remote/host