Posts

Showing posts with the label ssh

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...