Wednesday, November 13, 2024

Understand the installation of Kali Linux on AWS EC2 Instance

Kali Linux is an open-source, popular Debian-based Linux OS developed to use for security and advanced penetration testing of IT systems. Moreover, this Linux distribution offers a number of tools to execute multiple tests on networks or systems to tackle hacking and find out loopholes.

To make this Linux distribution more friendly, Kali Linux is based on Debian. It uses the most popular Gnome Linux desktop environment as an interface for a desktop. It is an open-source project, operated by Offensive Security, an American International Co. working on information security.  Earlier only professional users were able to use it but now private individuals can also use this.

Let us know the process of installing Kali Linux on AWS EC2 Instance step-wise.

Installing Kali Linux on AWS EC2

We can use AMI or Amazon Machine Image for installing any Linux distribution on AWS EC2 which is very easy. However, we can easily deploy and start using Kali Linux with a few clicks.

Amazon Management Console Login

If you are a new user of AWS cloud then you must create an account with Amazon, the cloud computing service provider. AWS also offers a free trial for new users for up to one year. Thus, you can utilize this opportunity to experience the service without paying. Thereafter, creating an account, you must log in to continue.

Access AWS EC2 Dashboard

Once you logged into the Management Console, then click on the Service Menu and select the EC2 option. This will give you access to the Dashboard which is dedicated to managing instances, storage, and services. Only people with certain permissions can use this dashboard.

Start the New EC2 Instance for Kali Linux

Read More   Top Automotive Software Engineering Trends to Watch Out in 2023

In the Amazon EC2 Dashboard, you will find the (EC2) Instances option on the left of the dashboard. Now you have to select that. Then just click on the “Launch Instance” button and your EC2 Instance will start.

Start Accessing Kali Linux by searching it in AWS MarketPlace

After you reach the page – Choose an Amazon Machine Image (AMI), then select the tab AWS Marketplace that you will find on the left side. Then, just go to the Search box, type- Kali, (for Kali Linux), and then hit the button “Enter” and wait for processing.

Choose the Kali Linux Image

After you press “Enter”, you can see the pre-built Kali Linux Image will appear offered by Offensive Security Co. in the first place in the search results. Then just click the “Select” button and wait for the next.

Select an Instance Type

Now, you have to configure or build the Instance type for Kali Linux. For this, you can choose the free Instance type available or you can use anyone as you are planning to execute this pen testing Linux. After choosing the Instance type, you just click on the “Review and Launch” button to start the Instance.

Evaluate the Instance Launch

Before you launch the Kali Linux on Amazon EC2, you can “Edit” multiple settings there. For example, if the default storage space is 12 GB, you can increase this space if you want more. Otherwise, you can leave the default settings as it is and move ahead by clicking on the “Launch” tab.

Build a new key pair

However, users have the choice to create a new key pair, if there is no existing key pair available. Now from the drop-down option select the “Create a new key pair” option. You can add any name to your new Key. Next, you have to download this key pair and save it in a safe folder. This is useful to link it with our Kali Linux EC2 Instance remotely using SSH.

Read More   Software Product Development: What, Why, and How?

Link Your Kali Linux AWS EC2 Instance Through SSH

Thus, you have to open the Command prompt or terminal on your local machine and use the downloaded Keypair. Then you can run the command.

Then, Amazon AWS will start the Kali Linux system and assign it a public IP. But we should be ready to access this system. Now, let us move further to how we can use OpenSSH to access the Kali System.

Design OpenSSH for accessing SSH remotely

Here, AWS already builds a default way to access SSH for their Kali AMI. This is set with an AWS EC2-user account through a given public key. However, you cannot access this conveniently through a mobile device. 

But if you want to easily access SSH into your Kali instances using mobile apps directly with root liberty. Then you have to follow the process further. 

It should be noted, that if you want to secure the Instance, then using a user account with PKI validation with some limitations is the only secure way to connect with SSH. But if you use a root account with a certain password, then it is not suggestible as it is risky.

How to set Root Password?

To configure the root SSH on Kali Linus, you just need to set a root password for this. Moreover, in the root account generally, there is no password set for Amazon EC2 instances. This is for those who are using an EC2 User account with Sudo rights. 

This requires to be set if we are creating SSH access from mobile SSH apps. Also, we need to keep in mind that it will reduce the security stance of the Kali instance.

Read More   Simple Steps to Install Docker on Ubuntu

Then, we can change the root password simply as we run sudo passwd on the SSH terminal. Also, we can change the existing user password by running Sudo passwd EC2 user on the SSH.

Now we can enable root and password validation on SSH by enabling the OpenSSH server which is by default login disabled. For this, we need to edit the configuration file. There are two different parts to this authentication system:-

  • PermitRootLogin
  • PasswordAuthentication

Once you are clear with the changes, you may have to restart the SSH service. Thus, you can access the Kali Machine easily which runs over the cloud through SSH using a password.

If you’re willing to get updated with AWS skills including Amazon EC2 Instance types and its various aspects. Then you can go with the AWS Training in Hyderabad with expert guidance in real-time. 

Conclusion

Hence, this is all about installing Kali Linux on AWS EC2 Instance in a detailed way. You can find there are many instance types but the Amazon EC2 instance has special potential. Using this can ease your pen testing through Kali Linux. 

So, learn AWS in a professional way to get more updates on it. Put your queries if you have any in the comment box so that you can get more answers.

Was this article helpful?
YesNo
Aadithya
Aadithyahttps://technologicz.com
A Aadithya is a content creator who publishes articles, thoughts, and stories on a blog, focusing on a specific niche. They engage with their audience through relatable content, multimedia, and interacting with readers through comments and social media.

Related Articles

Stay Connected

546FansLike
200FollowersFollow
0SubscribersSubscribe

Latest Articles