How to SSH into Home Assistant

  • Post author:WunderTech
  • Post published:April 6, 2023
  • Post last modified:May 10, 2024
  • Post category:Home Assistant
  • Reading time:7 mins read

In this tutorial, we will look at how to SSH into Home Assistant.

There are various times when you might have to SSH into your Home Assistant installation (installing HACS is a great example). In cases like this, there are a few different ways that it can be accomplished, but we will look at the recommended option below.

For this reason, we will look at how to SSH into Home Assistant after allowing Advanced mode. I will mention this a few times below, but make sure that you’re careful when you access Home Assistant through SSH.

How to SSH into Home Assistant

We will look at how to SSH into Home Assistant below, but before we do, we’ll look at a few reasons why you might have to SSH into Home Assistant.

Troubleshooting: At times, you might need to SSH into Home Assistant to troubleshoot a specific issue you’re experiencing with the Home Assistant installation.

Configuration: There are specific components inside of Home Assistant that may require configuration from the terminal through SSH.

Add-ons: There are various add-ons (like HACS) that must be installed through SSH.

Enable SSH in Home Assistant

Before you can SSH into Home Assistant, you must enable Advanced Mode under your user account by following the instructions below.

1. Select your User Account in the bottom left.

selecting the user account in home assistant.

2. Enable Advanced Mode in the account options.

enabling advanced mode in home assistant.

Terminal & SSH Add-on – How to SSH into Home Assistant

1. Now that Advanced Mode is enabled, we can install the Terminal & SSH application. Select Settings in the bottom left.

selecting settings in home assistant.

2. Select Add-ons.

selecting add-ons in home assistant.

3. In the bottom right, select Add-On Store.

selecting the add-on store.

4. Search for Terminal & SSH, then select the Official add-on.

searching and selecting the terminal and ssh package. how to ssh into home assistant.

5. Select the Install option.

installing the terminal & ssh.

6. When it’s done installing, select Start in the bottom left. You can also enable any of the other options that you’d like.

ensuring that ssh starts at boot.

7. After it’s started, select Open Web UI in the bottom right.

opening the web ui after the add-on is started.

8. After you open the Web UI, you can interact with the terminal any way you’d like!

getting the hacs package.

Risks to Allowing Home Assistant SSH Access

While SSH access is sometimes required to install certain features or troubleshoot different problems, there are a few reasons why you might want to disable it after use:

Security: By enabling SSH access, there are potential security vulnerabilities that are being exposed as well. This is the reason why the process above uses the web UI as opposed to traditional SSH tools or through the terminal. This process requires authentication into Home Assistant before being able to SSH into the operating system.

If you attempt to SSH directly into Home Assistant outside of the Web UI, access will be denied. This is, in my opinion, the most secure way of allowing SSH access in Home Assistant while also maintaining somewhat strong security.

Data Loss: If you aren’t sure exactly what you’re doing, you can indirectly remove directories or files. For this reason, always use caution when using SSH in Home Assistant.

Conclusion: How to SSH into Home Assistant

This tutorial looked at how to SSH into Home Assistant. While there are scenarios where SSH access is necessary, there are risks to it that you must be aware of. Always use caution when accessing Home Assistant through SSH and consider disabling it after use.

One of the most powerful things you can do with SSH access is to configure HACS, so if you’ve never used or heard of HACS (Home Assistant Community Store), I recommend checking it out!

Thanks for checking out the tutorial on how to SSH into Home Assistant. If you have any questions on how to SSH into Home Assistant, please leave them in the comments!

WunderTech

WunderTech is a website that provides tutorials and guides on various NAS, server, networking, and infrastructure-related topics. WunderTech is maintained by Frank Joseph, an IT professional with 14+ years of experience in corporate IT and application management. He focuses on sharing his experience with others on his WunderTech website and YouTube page. Frank holds a Bachelor of Science in Computer Information Systems and a master of Business Administration (MBA).