liveBook · Manning

SSH

As explained in LLMs in Production

SSH is a cryptographic network protocol for secure remote login and command execution over an untrusted network.

A headless Raspberry Pi has no convenient screen or keyboard, and a cloud VM may be far from your desk. SSH provides a secure remote login so you can use a terminal on either machine. It enables remote command execution; it does not, by itself, bring your code onto the machine. section 11.1.2 section 5.1.1

Before connecting:

  • For a Raspberry Pi, enable SSH in Pi Imager’s Services settings. If using password authentication, set a username and a non-default password, and configure Wi-Fi or Ethernet. section 11.1.1
  • Find the Pi’s IP address through your router’s device list or, with a monitor and keyboard attached, run `ifconfig` or `ip a` on the Pi and look for `inet`. section 11.1.2
  • For a GCP VM, confirm its status is `RUNNING` before connecting. An unattended NVIDIA driver installation can briefly delay SSH access after the VM starts. section 5.1.1

Connect from a terminal

Use `ssh username@0.0.0.0` for the Pi, replacing the example username and address with yours. For the GCP VM, use `gcloud compute ssh ${INSTANCE_NAME}`; on first use, gcloud automatically generates an SSH key. Once connected to the VM, use `gcloud compute scp` from another terminal to copy files or a directory onto it. section 11.1.2 section 5.1.1

How LLMs in Production covers it

How deep it goes
Walks through enabling SSH and connecting, but does not explain the protocol’s cryptographic internals.
Examples
Shows Pi Imager’s Enable SSH setting, a terminal login to a Pi, and gcloud commands for VM access.
What it assumes
Introduces IP addresses while assuming access to a terminal and either Pi setup settings or an existing GCP VM.
What you can do after
Operate/configure it to reach a Pi or GCP VM remotely and account for common connection prerequisites.
How it connects
Connects SSH to headless computing, IP address discovery, password authentication, SSH keys, and SCP.

Also explained in

Compare how 4 books explain SSH →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of LLMs in Production. The section links point to the parts of the book it draws on.