Course Overview
Locked video preview

Paid video

Please purchase the course to watch.

Setting up a secure VPS

SSH and keys

Here is a summary of the video transcript:

  • Self-Hosting Strategy
    The video introduces deploying an application by setting up and managing a personal VPS instead of relying on managed cloud services. This approach is presented as cost-effective and capable of handling significant traffic on low-cost servers.

  • Introduction to SSH
    SSH (Secure Shell) enables encrypted remote access to a server via the command line. It ensures that commands, file transfers, and other communications between the local machine and server remain secure.

  • SSH Authentication with Keys
    Instead of password-based authentication, the setup uses SSH key pairs consisting of a public and private key. The public key is stored on the server, while the private key remains on the local machine to provide cryptographic proof of identity.

  • Security Benefits of SSH Keys
    SSH keys are highly resistant to brute-force attacks due to their large key sizes. Disabling password authentication further reduces attack surfaces and prevents credential interception over the network.

  • Generating SSH Keys
    The ssh-keygen tool is used to generate keys, specifying the algorithm (ED25519), an identifying comment, and a file name. The process creates both a private key (kept locally) and a public key (uploaded to the server).

  • Key File Structure and Usage
    By default, SSH keys are stored in the .ssh directory with separate private and public files. The private key enables authentication, while the public key is deployed to the server to grant secure access.