amazon web服务-2个AWS实例之间的scp



我有两个AWSUbuntu 14.04实例。

一个实例是主ELK服务器。另一个实例将是logstash的日志转发器

作为设置转发器的在线说明的一部分,我在ELK服务器实例上输入以下内容:

scp /etc/pki/tls/certs/logstash-forwarder.crt user@client_server_private_address:/tmp

我将用户替换为ubuntu,将私有地址替换为日志转发器实例的公共DNS名称。

两者都在同一VPC和安全组中。当我运行时

scp -v 

我得到:

No more authentication methods to try.
Permission denied (publickey).

当目标主机没有发送文件的源计算机的入站流量余量时,可能会出现此问题。

打开源计算机的目标入站规则上的TCP端口,如下所示:

Step1: Go to the security group associated with the destination machine.
Step2: Open TCP port in the inbound rule for the source machine.

现在试试

scp /etc/pki/tls/certs/logstash-forwarder.crt user@client_server_private_address:/tmp

来自源机器的命令

希望能有所帮助。。。。。

最新更新