Tutorial

How to SSH into Home Assistant (OS, Container & from your phone)

SSH into Home Assistant the right way: the SSH add-on on HA OS, host SSH for Container/Core installs, the key ha commands, doing it from your phone, and remote access via Tailscale.

CC Chen Chen· Founder·June 9, 2026·6 min read

How to SSH into Home Assistant

There are two layers to "SSH into Home Assistant," and mixing them up is the usual source of confusion. On Home Assistant OS, you don't SSH into the host directly — you install an SSH add-on that drops you into the Home Assistant environment, where you can edit configs and run ha commands. On Container/Core/Supervised installs, you SSH into the underlying Linux host as normal. This guide covers both, and how to do it from your phone.

Home Assistant OS — use the SSH add-on

  1. In Home Assistant, go to Settings → Add-ons → Add-on Store.
  2. Install "Terminal & SSH" (official) or "Advanced SSH & Web Terminal" (community, more flexible).
  3. Open the add-on's Configuration tab and set a password or, better, add your SSH public key under authorized_keys.
  4. Set the port (default 22 for the advanced add-on; the official one uses the web terminal plus optional SSH) and Start the add-on.

Now connect from any SSH client to your HA box's IP on that port, username root (advanced add-on) — you land in the Home Assistant shell with the /config folder right there.

Container / Core / Supervised — SSH to the host

If you run Home Assistant in Docker or as a Core install on your own Linux box, there's no add-on layer: just SSH into that host the normal way (host IP, port 22, your user), then work with the container or the config directory directly.

Doing it from your phone

This is where it gets handy — fix your smart home from the couch or while you're out. Install an SSH client (iPhone options / Android options), add a connection to your HA IP and port, and connect.

TermAI on a phone suggesting a Home Assistant command with a Run button
From the phone, TermAI's AI assistant is handy for HA admin: ask 'restart Home Assistant' or 'check the config' and get the exact ha command to review and run.

Useful Home Assistant SSH commands

  • ha core check — validate your configuration before restarting
  • ha core restart — restart Home Assistant
  • ha core logs — tail the logs to debug an issue
  • nano /config/configuration.yaml — edit your main config
  • ha su update / ha core update — update the supervisor / core

If you don't remember the exact ha subcommand, describe what you want to TermAI's assistant and it'll suggest it — useful when you're debugging from a phone.

When you tail the logs with ha core logs -f (or journalctl -f on a Container host) to watch an automation fire, TermAI switches into a log-stream mode: a toolbar lets you pause the flow, filter the last 500 lines with errors and warnings colour-coded, and hand the last 100 lines to the AI for a quick "why did this automation fail?". A lot less painful than watching HA logs scroll past on a phone.

SSH into Home Assistant from outside your network

Don't forward the SSH port to the internet to reach HA while away — that exposes your smart-home hub. Install Tailscale (there's a Home Assistant add-on for it) on your HA box and your phone, or use TermAI's built-in Tailscale, and you can SSH to Home Assistant by its private address from anywhere. See Tailscale on iPhone.

FAQ

Why can't I SSH directly into Home Assistant OS?
HA OS is a locked-down appliance; the host shell isn't meant for daily use. The SSH add-on gives you a supported shell into the Home Assistant environment instead.

What username do I use?
With the Advanced SSH & Web Terminal add-on it's root. On a Container/Core host, it's your normal Linux user.

How do I SSH into Home Assistant remotely?
Use Tailscale (there's an HA add-on) rather than port forwarding, then connect to HA's private address.

Quick Facts

  • HA OS: install the Terminal & SSH or Advanced SSH add-on — don't SSH the host directly
  • Container/Core: SSH into the underlying Linux host normally
  • Key commands: ha core check, ha core restart, ha core logs
  • From a phone: any SSH client; TermAI adds AI help for ha commands
  • Remote access: Tailscale, not port forwarding
Try TermAI

Free on iOS and Android. 5 AI requests/day on the free tier, plus unlimited SSH/SFTP and built-in Tailscale.

CC
Chen Chen — Founder of TermAI

Writes about mobile DevOps, terminal UX, and the surprising depth of "boring" infrastructure.

Was this useful? ← Back to blog