我正在尝试通过在ec2上运行scp命令将文件从服务器复制到服务器。
**My command:**
[ec2-user@ip-xx-xx-xx-xxx ~]$ scp -P 51865 [email protected]:/home/yakir/tr/tracker-2019-12-12.tar.gz [email protected]:/home/ec2-user/tracker-2019-12-12.tar.gz
错误是:
usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 ... [[user@]host2:]file2
我应该怎么做才能使其起作用?
谢谢!
ssh到服务器并运行scp
ssh -P 51865 [email protected] "scp /home/yakir/tr/tracker-2019-12-12.tar.gz [email protected]:/home/ec2-user/tracker-2019-12-12.tar.gz"