我需要从本地计算机将zip文件复制到远程服务器。尝试以下命令:
scp /path-of-folder-which-needs-to-be-added-in-remote-server /username@remotr:where-to-add
收到错误:
Permission denied (publickey).
lost connection
这样做的正确命令是什么?
答案 0 :(得分:0)
您的命令 使用正确的语法,但显然存在身份验证错误。确保您使用相应服务器的正确密钥;如果未设置,请使用-i
参数在运行时设置它。语法为-i <identity_file>
,因此请提供您的私钥。