Last Updated: 17 April 2018
By Maynard Paton

Configuring Your AWS Server For SSH Access

Welcome to Part 3 of Installing Sendy and Virtualmin on Amazon Web Services (AWS).

This page describes how to configure your AWS server (or ‘instance’) to allow access through an SSH client.  Such access is required to install Virtualmin and Sendy. (Source: AWS and Tharindu Kumara)

Before You Start:

Part 3 uses an SSH client to issue instructions through the command line to your AWS server. Please read Getting Started With SSH Clients And Terminal for more details.

Here are the steps to follow

1) If you have just completed Part 2, you should already be logged in to AWS and the EC2 service.

Otherwise, log in to the AWS console at

Make sure Your AWS Region is set correctly:

Select EC2 from the Services menu:

Select Instances from the left-hand menu:

2) Find the Public DNS (IPv4) address of the server created in Part 2. If need be, click the box on the right to show the server’s full details:  

(Note: your server’s Public DNS (IPv4) address will differ to the one shown in the screenshot above.)

3) Click the Copy to clipboard icon to copy the Public DNS (IPv4) address:

4) Open a new Terminal window. At the command line type chmod 400 then press the space bar:

5) Drag the private key file created in Part 2 into the Terminal window:

The instruction should look something like this:

chmod 400 /Users/username/DeskTop/YourKeyPairName.pem

Then press Enter.

6) At the command line type ssh -i then press the space bar.

Then once again drag the private key file created in Part 2 into the Terminal window.

Then type ubuntu@

Then press CTRL + V to paste the Public DNS (IPv4) address into the Terminal window.

The full instruction should look something like this:

ssh -i /Users/username/DeskTop/YourKeyPairName.pem

Then press Enter.

7) You will probably receive a message about a ‘fingerprint’. If you do, enter:


You should now be logged into your AWS server as user ubuntu

8) At the command line, switch to the root user by entering:

sudo -i

The command-line prefix should now change from ubuntu@ to root@:

9) At the command line, enter:

nano /etc/ssh/sshd_config

You should see something like this, and be able to edit the file:

10) Use the downward arrow key to scroll through the file until you reach the line PermitRootLogin prohibit-password:

11) Replace prohibit-password with yes

12) Use the downward arrow key to scroll through the file until you reach the line PasswordAuthentication no:

13) Replace no with yes

14) Press CTRL + O

File Name to Write: should appear. Press Enter.

15) Press CTRL + X and you should return to the command line:

 16) At the command line, enter:

service sshd reload

The command line should reappear:

17) At the command line, enter:


Enter a password. Note: the cursor may not move when you type the password.


This password is your server root passwordMake a note of your server root password as it will be used several times within the rest of the Installing Sendy and Virtualmin on AWS guide.

You will be asked to retype the password: 

18) Then at the command line, enter:


…to exit from the root user, then enter: 


…to exit from the ubuntu user, then enter:


…to exit the Terminal process.

Now close the Terminal window.

19) All done!

Stay logged into AWS, and click here to start Part 4. Alternatively, click here to return to the Introduction.

If you have any questions or comments about this page, please let me know so I can keep this website as helpful as possible.

Happy installing!

Maynard Paton

(Want to learn more? Click here to visit the full website index.)


Sendy Is Fast, Reliable And Cheap!

We found that as our subscribers grew, we were creeping up to over $100 a month for a traditional cloud-based email marketing platform. We decided to explore alternatives and ended up landing on a great self-hosted email marketing solution called Sendy.

Overall, we've found Sendy to not only be an excellent alternative to MailChimp, but to blow it away as far as speed, usability and functionality are concerned.

Sendy is fast, reliable and cheap.

Mike Johnston, , Sendy customer

MailChimp 'Disruptor'. $59 One-Off Fee. Full Refund Available.