Skip to content

Connect to your instance

You need a terminal on the instance to set up Hermes, run the hermes-n8n command and read logs. There are three ways in. The user name is always ubuntu.

ssh -i <key>.pem ubuntu@<public-ip>

Port 22 must be open to your address in the instance's security group. If your address has changed since launch, update that rule.

On Windows, if SSH refuses the key as unprotected, limit the file to your own user first:

icacls <key>.pem /inheritance:r /grant:r "$($env:USERNAME):(R)"

In the browser, with no local software. Select the instance in the EC2 console, choose Connect, and on the EC2 Instance Connect tab check that Username is ubuntu.

The connection comes from AWS, not from your computer, so port 22 must also be open to AWS's Instance Connect addresses.

Not with SSH from My IP only

A security group that allows SSH from My IP only turns the Connect button away, every time. Add a second rule as below.

To add the rule to a running instance:

  1. In the EC2 console, open the instance, choose the Security tab, and select its security group.
  2. Choose Edit inbound rules, then Add rule.
  3. Set Type to SSH. In Source, search for ec2-instance-connect and choose com.amazonaws.<region>.ec2-instance-connect, for example com.amazonaws.us-east-1.ec2-instance-connect.
  4. An autofill suggestion will appear when searching for this that looks something along the lines of com.amazonaws.us-east-1.ec2-instance-connect | pl-.... This is the option you need to select.
  5. Choose Save rules.

Keep your My IP rule as well, for SSH from your own terminal, should you need to access the instance through this means.

The instance needs a public IP address, and your AWS user needs permission to use EC2 Instance Connect.

No open ports at all, and access is controlled entirely by IAM. Give the instance an IAM role with the AmazonSSMManagedInstanceCore policy (in the EC2 console: Actions, Security, Modify IAM role), wait a few minutes, then choose Connect and the Session Manager tab.

Session Manager signs you in as ssm-user. Run this first to work as ubuntu, which Hermes's setup expects:

sudo -iu ubuntu

Session Manager can also forward n8n's port, if you keep n8n off the internet. See The n8n dashboard.

Last updated October 25, 2026 · Suggest an improvement