Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn SSH Connection to Ubuntu | Automating Infrastructure in DevOps
Introduction to DevOps

bookSSH 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?

Note
Definition

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?

question mark

What does SSH stand for?

Select the correct answer

question mark

Why do we use the root user to connect to the server?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 4

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Awesome!

Completion rate improved to 3.7

bookSSH 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?

Note
Definition

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?

question mark

What does SSH stand for?

Select the correct answer

question mark

Why do we use the root user to connect to the server?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 4
some-alt