Posts

Showing posts with the label ssh

Using AWS EC2

Image
Introduction Amazon EC2 (Elastic Compute Cloud) is one of AWS’s core and most popular services, providing virtual servers (called Instances) that can scale flexibly in the cloud. Simply put, instead of purchasing and maintaining physical hardware, EC2 allows you to “rent” computers with customizable configurations (CPU, RAM, storage, operating system) within minutes. Key features Elasticity: You can instantly increase or decrease the number of servers to handle traffic, helping optimize performance. Flexible pricing: Uses a “Pay-as-you-go” model (pay only for what you use), reducing initial infrastructure investment costs. Full control: You get root access to each instance and can manage them like traditional physical servers. High reliability: EC2 runs on Amazon’s global infrastructure, ensuring high availability and strong security. With EC2, developers can easily deploy everything from simple web applications and database systems to complex machine learning models quickly and effici...

Automating Server Configuration with Ansible

Image
Introduction Ansible is an open-source IT automation tool written in Python . It's widely used for configuration management, making complex tasks simpler by automating system setup, software deployment, and more. Ansible is agentless , meaning it doesn't require an agent to communicate with other machines. It supports a wide range of operating systems, platforms, and devices, from Ubuntu and VMware to CentOS , Windows , Azure , AWS , and network devices like Cisco and Juniper . This design increases Ansible's usability because you don't need to install and maintain agents on hosts. This is a significant advantage over similar tools like Chef , SaltStack , and Puppet . Why Choose Ansible? Here are some reasons to choose Ansible over other configuration management tools: Open Source : It's free to use. Uses SSH : Easily connects directly to servers. Lightweight : Easy to set up and doesn't consume many resources. Readable Syntax : Uses YAML for scripts, ma...

SSH to Google Compute Engine

Image
Introduction I previously wrote a guide on creating a Virtual Machine (VM) instance on Google Cloud and accessing it via gcloud . However, if your Google Cloud account lacks permission to manage VM instances, or if you want to create a VM instance that allows SSH for easy sharing with other users and compatibility with various SSH tools, follow the steps below. Configure SSH access for VM instance Firstly, you need to create a compute instance as follows: gcloud compute instances create {instance name} \ --zone={zone} \ --machine-type= { machine type} # ex: gcloud compute instances create instance-1 \ --zone=asia-southeast1-a \ --machine-type=e2-micro Next, SSH into this VM to perform the necessary configurations. Typically, a Google VM instance will have a Distributor ID of Debian . Use the following command to check this before proceeding with the next steps. lsb_release -a Next, set the password for the root account as follows: sudo passwd Next, use t...