Secure Connections

Before any deployment can happen, we need to establish a secure connection from the workstation to the servers. We’ll need it to run various deployment tasks, upload configuration files, and log in. Lucky for us, all of that can be achieved using a single protocol. The Secure Shell protocol and the suite of tools called OpenSSH are all we’ll ever need for remote communication.One of the features of SSH is encrypting the communication using public-key encryption. By putting the public key on the server, we can create a secure connection using the associated private key. By leveraging SSH keys, we can avoid password-based authentication on the server altogether. And using SSH tunneling, we can reuse this connection for other services as well.

Table of Contents

SSH and OpenSSH

SSH Keys

A First Server

Remote Shell

File Transfers

SSH on Servers

SSH Tunneling


Buy for $50
Rated 36x five stars
Gumroad (as of Aug 3, 2023)
I am using some scripts I downloaded from Josef Strzibny's book that are setting up Ruby on Rails deployment and automatically installing a PostgreSQL server. I am also using Dokku, but I like the idea of controlling what is happening on the server.
Lucian Ghinda, Senior Ruby Developer