Managing FastAPI Projects with Poetry: A Step-by-Step Guide

SSH (Secure Shell) is a network protocol used to securely communicate between two computers and transfer data. One of the main features of SSH is that it works well on insecure networks, as the communication channel is encrypted. The most widely-used SSH implementation is the OpenSSH suite, which includes the following tools:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy
$ uname -r
6.8.0-57-generic
OpenSSH client is usually pre-installed on Ubuntu. To accept SSH connections, install the server component:
$ sudo apt update
$ sudo apt install openssh-server openssh-client
Verify installation:
$ ssh -V
OpenSSH_8.9p1 Ubuntu-3ubuntu0.13, OpenSSL 3.0.2 15 Mar 2022
Ubuntu uses UFW as the default firewall. Allow SSH with the following commands:
$ sudo ufw allow ssh
Rule added
Rule added (v6)
$ sudo ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup
$ sudo ufw status
Status: active
To Action From
-- ------ ----
22/tcp ALLOW Anywhere
22/tcp (v6) ALLOW Anywhere (v6)
Use systemctl to start and enable the SSH server (sshd):
$ sudo systemctl start ssh
$ sudo systemctl enable ssh
$ sudo systemctl status ssh
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2025-04-24 08:18:00 PDT; 2min 3s ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 3104741 (sshd)
Tasks: 1 (limit: 18790)
Memory: 1.7M
CPU: 25ms
CGroup: /system.slice/ssh.service
└─3104741 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"
Apr 24 08:18:00 GU502DU systemd[1]: Starting OpenBSD Secure Shell server...
Apr 24 08:18:00 GU502DU sshd[3104741]: Server listening on 0.0.0.0 port 22.
Apr 24 08:18:00 GU502DU sshd[3104741]: Server listening on :: port 22.
Apr 24 08:18:00 GU502DU systemd[1]: Started OpenBSD Secure Shell server.
Try connecting to your own machine to verify SSH is working:
$ ssh your_username@127.0.0.1
First-time connection prompt:
$ ssh jason@127.0.0.1
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
ED25519 key fingerprint is SHA256:y+fnvwQ29kzrFIrvXBEl7NXd9ZdjdZsj6xDaCKY94Tc.
This host key is known by the following other names/addresses:
~/.ssh/known_hosts:1: [hashed name]
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '127.0.0.1' (ED25519) to the list of known hosts.
jason@127.0.0.1's password:
Welcome to Ubuntu 22.04.4 LTS (GNU/Linux 6.8.0-57-generic x86_64)
If you see the login prompt and connect successfully, your SSH server and client setup is working properly!
Comments
Post a Comment