Home Assistant Community Add-on: SSH & Web Terminal

:tada: Release v2.4.0

This release is exciting, at least, for me it is. I’ve been working on this for months! And for you? Well, almost nothing changed :stuck_out_tongue:

So what did change? I’ve updated the workflows of the Community Hass.io Add-ons project. Things include:

  • Replaced CircleCI and CodeClimate. We are now using GitLab CI, backed by a couple of custom servers building and testing these add-ons.
  • All add-ons are now scanned during built and release by Clair to prevent security issues in our add-ons.
  • All add-ons are constantly scanned and monitored by Anchore.io. We will be notified immediately in case of security issues occur. (Major thanks to Anchore.io for helping us out!)
  • The add-ons repository is now entirely generated and automatically synced with all the add-ons. This ensures repositories are in sync, never forgotten and releases are almost instantly.
  • The base images that these add-ons are built on are entirely revised.
  • All add-ons have been updated to follow the Docker best practices. These are checked on every code change by GitLab CI.
  • All add-ons had maintenance. All software is updated to the latest and greatest and the documentation has been revisited.
  • There are now 2 bots in place on the GitHub project. The Add-ons Assistant is helping us out with the GitHub issues and pull requests and the AddonsBot is fully active taking care of updating code across the different GitHub Repositories.
  • We now have Edge & Beta add-ons repositories available. This allows everybody to test the latest and greatest (in case you don’t care about stability that much, or just wanna help out!)
  • I’ve removed all the PayPal, Bitcoin, … buttons. If you’d like to show your appreciation, then please, just buy me a coffee.

So that’s quite a lot, right? So what changed in this specific add-on?

Full Changelog

Added

  • Adds all architectures to add-on config
  • Adds .yamllint configuration
  • Adds SQLite by default
  • Adds Probot configuration
  • Adds add-on README template
  • Adds Gitlab CI

Fixed

  • Fixes Markdownlint warning in License
  • Fixes hadolint warnings
  • Fixes sudoers file permissions

Changed

  • Replaces Changelog with GitHub releases
  • Updates hassio-cli to v1.3.0 (#18) (@bastula)
  • Updates README
  • Upgrades add-on base image to v1.4.1

Removed

  • Removes CodeClimate
  • Removes CircleCI
  • Removes supervisor version constraint from add-on config

:tada: Release v2.4.1

Full Changelog

Changed

  • Updates hassio-cli to v1.3.1
  • Updates bind-tools to 9.11.3-r0
  • Updates sqlite to 3.21.0-r1

Possible stupid question alert:

I am currently using the built-in add-on. After I uninstall it and install this instead can I use the same authorized key?

Here is my built-in add-on config

Should work like a champ. An SSH key is an SSH key – the one that you carry over from the old installation of the SSH plugin is tied to your private SSH key on your source machine. That, presumably, is still valid.

So, in other words, good to go.

1 Like

:tada: Release v2.5.0

Full Changelog

Fixed

  • Fixes shellcheck warnings

Changed

  • Moves build-env to latest
  • Upgrades base image to v1.4.2
  • Upgrades git to 2.15.2-r0
  • Rewrites GitLab CI

Hi Guys!

I’m considering merging this add-on (The Community SSH add-on) with the Terminal add-on.

The advantages of this would be:

  • Pick up sessions from SSH using your web terminal
  • Pick up session from your Web terminal using SSH
  • Smaller footprint (in case you have both installed)
  • Less maintenance for me

What do you think?

5 Likes

that would be awesome !

Most logical approach might be to do it in the same way the Let’s Encrypt and duckDNS ones work, ie you may want Let’s Encrypt on it own but you won’t want duckDNS without so a combo addon makes sense for the second scenario.

However, if it means loads more work I’m sure we’ll all be grateful with whatever we get :slight_smile:

Actually you might if you use Caddy… But with SSH and Terminal there doesn’t seem to be any downside if it’s set up so you can use one or the other in case you wanted to use the inbuild ssh addon.

I am new to ha and was following some helpful instructions by Ben at BRUH Automation on how to customize your ha interface. I was trying to follow his instructions on adding a logo image to a device by adding an entity_picture to my customize.yaml file. If I understood his instructions correctly, he created a “www” directory in the /.homeassistant folder and then added his image file in this directory and the just made reference to the image by entering entity_picture: /local/his_image_logo.png.

I am trying to relate Ben’s instructions to what I am seeing with both this SSH Shell and Samba where I only see the config, addon, share, and backup directories. According to the customize help file link below, I should use a URL or place the image file in the /local directory as shown below. However, I don’t see /local directory. Do I need to create a /local directory or a “www” directory as Ben suggested? If yes, where should I place it? I tried creating an /images directory in the config directory and making the entity_picture path /config/images/myimage.png, but that didn’t work. I could use some help translating Ben’s instructions after installing hass.io vs. what I am seeing on my hass.io installation. I would really appreciate it if someone can help me understand why there are difference and how I can translate his instructions so that I can add the image file to my customize.yaml file and have it be picked up correctly.

From the customization help file below, I should enter my folder path for my image file like “entity_picture: /local/toaster.jpg”

create the www folder under config folder
image

1 Like

Do as per @DavidFW1960 said but refer to it as ‘local’ not ‘www’ in HA.

Just installed and found that some commands don’t work. e.g.

➜  ~ hassio host reboot
ERROR
panic: interface conversion: interface is nil, not string

goroutine 1 [running]:
panic(0x2c7050, 0x107ac380)
	/home/travis/.gimme/versions/go1.7.6.linux.amd64/src/runtime/panic.go:500 +0x33c
github.com/home-assistant/hassio-cli/command/helpers.DisplayOutput(0x107b8200, 0x24, 0x200, 0x0)
	/home/travis/gopath/src/github.com/home-assistant/hassio-cli/command/helpers/common.go:118 +0x3c8
github.com/home-assistant/hassio-cli/command/helpers.ExecCommand(0x2f45fc, 0x4, 0x7eb03d86, 0x6, 0x0, 0x0, 0x76500, 0x0, 0x0, 0x0, ...)
	/home/travis/gopath/src/github.com/home-assistant/hassio-cli/command/helpers/common.go:155 +0x308
github.com/home-assistant/hassio-cli/command.CmdHost(0x10778420)
	/home/travis/gopath/src/github.com/home-assistant/hassio-cli/command/host.go:42 +0x4f0
github.com/urfave/cli.HandleAction(0x2af768, 0x324b18, 0x10778420, 0x0, 0x0)
	/home/travis/gopath/src/github.com/urfave/cli/app.go:503 +0xf0
github.com/urfave/cli.Command.Run(0x2f45fc, 0x4, 0x0, 0x0, 0x40bd20, 0x1, 0x1, 0x2fabdf, 0x18, 0x0, ...)
	/home/travis/gopath/src/github.com/urfave/cli/command.go:165 +0x6b8
github.com/urfave/cli.(*App).Run(0x107648c0, 0x1070a1e0, 0x3, 0x4, 0x0, 0x0)
	/home/travis/gopath/src/github.com/urfave/cli/app.go:259 +0x8b0
main.main()
	/home/travis/gopath/src/github.com/home-assistant/hassio-cli/main.go:22 +0x108

and

➜  ~ hassio network info 
Error decoding json invalid character ':' after top-level value: 404: Not Found#  

But the basic one did work

hassio ha restart

Am I doing something wrong?

David/Bobby.

Thank you for your prompt replies to my post. I will give your suggestions a try. It is good to know that the “config” directory corresponds to what Ben referred to as the /.homeassistant directory.

However, I have a bigger issue now that I cannot connect to my RPI using SSH after installing the SSH Shell. After I installed the SSH Shell I noticed I lost standard linux commands, such as those needed to help find and install a Aeotec Z-wave USB stick, such as “ls /dev/ttyACM*” along with other standard linux commands. The Shell seems to limit you to only a few hass.io related commands, but removes the ability to use the standard linux commands or to access my haadmin account. So I uninstalled the SSH Shell and tried to go back to using my old haadmin account that i used when I setup the RPI, but now I am completely locked out and and keep Server refused our key errors with a pop up dialog saying “No supported authentication methods available”. I am hoping I don’t have to start all over and re-image the SD Card in order to get back my standard SSH access, but it looks like that maybe the only alternative as I run this RPI completely headless. If anyone knows how to regain “standard” ssh commands after installing or uninstalling the SSH Shell or SSH Server (I tried both from the hass.io Store) I would appreciate the guidance.

Thanks again for the support of this forum. Without it I would be completely lost I think…

Andrew J

If you are running hass.io you don’t get regular shell access at all so I have no idea what you were doing before but the current behaviour is as you would expect for hass.io. You need to use addons and standard components provided with hassio. Zwave should be supported with no need to inatsll anything.

Hi David. Thanks for your reply. I setup SSH right after I installed Raspbian Stretch Lite in order to finish the installation and to install hass.io. I want to maintain the ability to issue standard Linux commands to update the Pi and perform normal system maintenance and configuration. With the SSH Shell available in the hass.io store it appears you loose most of the standard Linux commands and can only call hass.io commands which is a bit redundant since most of those commands can be called from the Configuration panel.

To fix the issue I ended up having to re-image my SD Card again with Raspbian Stretch Lite and then re-install hass.io. This time I did not install the SSH Shell or SSH Server from the hass.io store. However, as you noted now I cannot access the hass.io commands. So it would appear you have to choose to be either able to use SSH for hass.io or for Linux as there does appear to be away to use SSH for both.

Andrew J

This is no longer about the add-on. Please stay on topic in here or create a new topic for other discussions. Thank you.

:tada: Release v3.0.0

Major release!

This release is a big one! This release merges the SSH & the Terminal add-on into one pretty and useful piece of joy. For example:

You can now pick up your SSH session from the Web Terminal (or the other way around) with ease.

Tons of software has been upgraded, including the Web Terminal. See the changelog for a full list.

:warning: Upgrade notice

You will notice, the configuration has changed a lot.

Some previous set configuration options (like your authorized key) might not be migrated correctly by Hassio. And some new options regarding the Web Terminal are added.

If you do not want to use the Web Terminal, you can simply turn it off.

So check the configuration and make sure you have everything in it.

If it really became a mess on upgrading, I suggest to use the configuration “reset” button and work from that.

Changelog

Full Changelog

Added

  • Rewrites add-on to include both SSH and Web Terminal
  • Adds syntax highlighting in Nano
  • Adds support for audio and UART devices
  • Adds ZSH Autosuggestions
  • Adds ZSH Syntax Highlighting
  • Adds ack
  • Adds access to all possible hardware

Fixed

  • Fixes an issue with SSL not working

Changed

  • Upgrades base image to v2.0.1
  • Upgrades bind-tools to 9.12.1_p2-r0
  • Upgrades git to 2.18.0-r0
  • Upgrades libxml2-utils 2.9.8-r0
  • Upgrades mariadb-client to 10.2.15-r0
  • Upgrades mariadb-client to 10.2.15-r0
  • Upgrades nano to 2.9.8-r0
  • Upgrades ncurses to 6.1-r0
  • Upgrades net-tools to 1.60_git20140218-r2
  • Upgrades nmap to 7.70-r1
  • Upgrades openssh to 7.7_p1-r2
  • Uprades openssl to 1.0.2o-r1
  • Upgrades rsync to 3.1.3-r1
  • Upgrades sqlite to 3.24.0-r0
  • Upgrades sudo to 1.8.23-r2
  • Upgrades tmux to 2.7-r0
  • Upgrades vim to 8.1.0115-r0
  • Upgrades zip to 3.0-r5
  • Upgrades zsh to 5.5.1-r0
  • Upgrades Hadolint to latest version
  • Updates Hass.io ASCII art in MOTD
  • Updates add-on icon & logo
  • Documentation merge and naming updates
  • Layout improvements to README
  • Small tidy up
  • Updates forum URL
2 Likes

:tada: Release v3.0.1

Bugfix release.

Full Changelog

Added

  • Adds instructions on embedding Web Terminal into the frontend

Fixed

  • Fixes add-on devicetree permission issue

I could not access my system in Winscp - I was previously using Sudo-Su in Winscp under ResinOS but now under HassOS and this new addin I can’t had to change from sudo-su to bin/bash and I can connect and list files but I can’t edit anything or delete the database etc… Am I missing something in the settings?

If I use Putty I can delete files. I could use configurator but I just think I have something not configured correctly.

I am using the defaults (with ssh enabled and an authorized_keys migrated in from old snapshot)

I’m sure I just need to change a setting but what?