SSH Connection to Ubuntu
At the beginning, you will learn how to manually connect to the Ubuntu server using SSH, which was created with Terraform. This will help you verify that the server is running and accessible over the network. Later, this process will be automated using Ansible, but first, manual connection allows you to understand how it works.
What SSH?
SSH stands for Secure Shell. You can think of it as a secure way to open a terminal on another computer β in our case, the Ubuntu server.
Everything you send through SSH, including your login, password, and commands, is encrypted, so no one can intercept it.
SSH gives you full control over the remote server. You can do everything you normally do on your own computer: run programs, edit files, and install packages. For beginners, it's useful to think of it as "working on a computer remotely", without needing to be physically near it.
SSH Connection
To manually connect to a server, use the following template: ssh <USERNAME>@<HOST> -p <PORT>
.
In our case, it looks like this:
Here, root
is the username. We use root
because it is the administrative user with full privileges, allowing you to run any command without restrictions. localhost
indicates that the server is running on your machine (through Docker, but normally you would use the serverβs actual IP), and -p 2222
specifies the port used to access the container.
The first time you connect, SSH may ask for a password. In our case, it is the root
password, which was already set in the image created with Terraform.
After running the command, you will be in the server's terminal, where you can run commands, install packages, and check that the system is working. This step helps you understand how remote server management works and sets the stage for automating tasks with Ansible.
1. What does SSH stand for?
2. Why do we use the root user to connect to the server?
Thanks for your feedback!
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 3.7
SSH Connection to Ubuntu
Swipe to show menu
At the beginning, you will learn how to manually connect to the Ubuntu server using SSH, which was created with Terraform. This will help you verify that the server is running and accessible over the network. Later, this process will be automated using Ansible, but first, manual connection allows you to understand how it works.
What SSH?
SSH stands for Secure Shell. You can think of it as a secure way to open a terminal on another computer β in our case, the Ubuntu server.
Everything you send through SSH, including your login, password, and commands, is encrypted, so no one can intercept it.
SSH gives you full control over the remote server. You can do everything you normally do on your own computer: run programs, edit files, and install packages. For beginners, it's useful to think of it as "working on a computer remotely", without needing to be physically near it.
SSH Connection
To manually connect to a server, use the following template: ssh <USERNAME>@<HOST> -p <PORT>
.
In our case, it looks like this:
Here, root
is the username. We use root
because it is the administrative user with full privileges, allowing you to run any command without restrictions. localhost
indicates that the server is running on your machine (through Docker, but normally you would use the serverβs actual IP), and -p 2222
specifies the port used to access the container.
The first time you connect, SSH may ask for a password. In our case, it is the root
password, which was already set in the image created with Terraform.
After running the command, you will be in the server's terminal, where you can run commands, install packages, and check that the system is working. This step helps you understand how remote server management works and sets the stage for automating tasks with Ansible.
1. What does SSH stand for?
2. Why do we use the root user to connect to the server?
Thanks for your feedback!