Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

Allow another user to connect to my EC2 cloud machine

There might be times when you either have something fascinating happening on the Amazon cloud machine that you set up, or – more likely – you got stuck with a problem a friend might be able to help you with. Here are notes on how to set up a shared access for a standard (Ubuntu linux) computer.

If you set up your EC2 machine securely, it will not allow anyone but you to access it though: The “security group” used allows your IP only.  (If you set it up insecurely with Source = 0.0.0.0/0 your friend – and anyone else – will be able to access it directly!) There is however the option to modify this security group, and after a few minutes delay it will be applied even to running machines! So all you need to do to allow your friend to work alongside of you is to add his IP address and add his public SSH key:

Part 1 (see screenshot below):

  • Find out the additional IP address, e.g. with www.iplocation.net/find-ip-address from your friend’s computer, e.g. 79.217.24.86
  • Go to the EC2 management console
  • In the navigation pane, choose Network Interfaces.
  • Select the network interface and choose Actions >> Edit inbound rules
  • Add a new SSH rule with the additional IP address, e.g. 79.217.24.86/32 and save it. 

Part 2:

  • copy his public SSH key to the machine (using your own private key):

    scp -i "~/.ssh/your-key-region1.pem" friends_key.pub ubuntu@ec2-54-236-163-221.compute-1.amazonaws.com:~/
  • log into the machine (with your own private key):

    ssh -i "~/.ssh/your-key.pem" ubuntu@ec2-54-236-163-221.compute-1.amazonaws.com
  • add the new key to your existing keys:

    cat friends_key.pub >> .ssh/authorized_keys

He can now log in with his own (private) key:

ssh -i "~/.ssh/friends_key.pem" ubuntu@ec2-54-236-163-221.compute-1.amazonaws.com

This description was based on this help page.