hn.today

You can't afford to keep your SSH keys on disk

jola.dev179 points115 comments
Screenshot of You can't afford to keep your SSH keys on disk

Recent breaches and vulnerability reports prompt a broader effort to reduce security exposure: the writer has removed unused self-hosted services, restricted others behind Tailscale, and kept systems updated. On a personal computer, one remaining risk was SSH private keys stored on disk. Although copies were backed up in Bitwarden, the writer still used disk-based keys loaded into memory, leaving them vulnerable to theft by malicious software. The proposed fix is to use Bitwarden’s SSH agent so private keys remain in the password manager rather than on disk, while keeping everyday SSH use straightforward.

The setup involves importing keys into Bitwarden, enabling its SSH agent, and configuring SSH and the terminal to use Bitwarden’s agent socket; after confirming the keys are available, local copies can be deleted. The writer also uses a dedicated SSH key for Git commit and tag signing, configured through Git and registered with hosting services so signatures are recognized. After several weeks, the workflow has required little adjustment: Bitwarden sometimes asks permission to use a key, and unlocking the vault can use Touch ID. The main drawbacks are a slightly awkward approval prompt and the inability to set a separate lock interval for SSH keys. Overall, the approach offers stronger protection with only minor added friction.

Read on jola.dev115 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Security

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.