SSH into Amazon EC2 to create Tor Relay

0

Iā€™m creating a Tor bridge using Amazon EC2. But, I cannot SSH into my EC2 instance.

I run the command ssh -vvv -i torRelayNode.pem username@amazon_instance

Here is the response:

debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to [amazon_instance] port 22.
ssh: connect to host [amazon_instance] port 22: Operation timed out

Potential Solutions:

  1. SSH does not work with PEM files, so I need to convert PEM into a file format that OpenSSH understands - Amazon's instructions use a PEM file so I don't think it is this.
  2. Change the port number in my sshd_config copy file to correspond to the port number of EC2 which is 9001 - this might be right but Tor Relay instructions I'm following don't say to change sshd_config.

leon_vynehall

Posted 2019-05-20T19:05:39.990

Reputation: 1

Answers

0

The error " connect to host [amazon_instance] port 22: Operation timed out" implies the immediate problem is not key related, rather there is an inability to handshake a tcp connection.

This means the issue is either sshd is not running, is not listening on port 22 on that IP or is firewalled off.

If its firewalled off this could be in the EC2 intance, in the AWS controls, or, less likely, any hop between you and AWS.

davidgo

Posted 2019-05-20T19:05:39.990

Reputation: 49 152

I was able to connect using these instructions: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html Thank you!

ā€“ leon_vynehall ā€“ 2019-05-21T15:03:43.103