Skip to content

Instantly share code, notes, and snippets.

@mw866
Last active January 10, 2024 07:15
Show Gist options
  • Save mw866/2dab12c6b9166460809a54edff80650d to your computer and use it in GitHub Desktop.
Save mw866/2dab12c6b9166460809a54edff80650d to your computer and use it in GitHub Desktop.
#utm

Set up headless Ubuntu Server x64 on macOS using UTM

Create UTM Virtual Machine

Set up SSH

Step 1: On macOS host, Test password authentication

ssh ubuntu@localhost

Step 2: On macOS host, copy public key to Open SSH Server

ssh-copy-id -i ~/.ssh/id_ed25519 ubuntu@localhost

Step 3: On macOS host, test SSH key-based authentication

ssh ubuntu@localhost

Step 4: On Ubuntu guest, verify authorized_keys and disable password authentication

cat .ssh/authorized_keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment