scp between 2 AWS Instances

276 views Asked by At

I have 2 AWS instances of Ubuntu 14.04.

One instance is the master ELK server. The other instance will be the log forwarder for logstash.

As part of the online instructions to setup the forwarder I enter the following on the ELK server instance:

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

I replace user with ubuntu and the private address with the public DNS name for the Log Forwarder instance.

Both are in the same VPC and Security Group. When I run

scp -v 

I get:

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

There are 1 answers

0
Domain On

This problem may occur when the destination host don't have inbound traffic allowance for the source machine from which the file has been sent.

Open the TCP port on the destination inbound rule for the source machine as follow:

Step1: Go to the security group associated with the destination machine.

Step2: Open TCP port in the inbound rule for the source machine.

Now try

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

command from the source machine

Hope it helps.....