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.
2. Enable Advanced Mode in the account options.
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.
2. Select Add-ons.
3. In the bottom right, select Add-On Store.
4. Search for Terminal & SSH, then select the Official add-on.
5. Select the Install option.
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.
7. After it’s started, select Open Web UI in the bottom right.
8. After you open the Web UI, you can interact with the terminal any way you’d like!
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!