Home Assistant Community Add-on: SSH & Web Terminal

Sorry about this. I just see that the configuration screen has save buttons per section. I every time scrolled to the end of the page and used the save button at the bottom. Now I noticed the save button in the section. With that, it works as expected.

Implementing a single save button would be helpful for inattentive people like me.

When I try to change the configuration I get an error that one option is missing even itā€™s present.

This is the config I use, a very basic one:

ssh:
username: hassio
password: ā€˜ā€™
authorized_keys:
sftp: false
compatibility_mode: false
allow_agent_forwarding: false
allow_remote_port_forwarding: false
allow_tcp_forwarding: false
zsh: true
share_sessions: false
packages:
init_commands:

And this is the error:

Failed to save add-on configuration, Missing option 'allow_tcp_forwarding' in ssh in SSH & Web Terminal (a0d7b954_ssh). Got {'init_commands': [], 'packages': [], 'share_sessions': False, 'ssh': {'ssh': {'username': 'hassio', 'password': '', 'authorized_keys': [], 'sftp': False, 'compatibility_mode': False, 'allow_agent_forwarding': False, 'allow_remote_port_forwarding': False, 'allow_tcp_forwarding': False}, 'zsh': True, 'share_sessions': False, 'packages': [], 'init_commands': []}, 'zsh': True}

I really donā€™t understand whatā€™s going on.

On the config page, hit the 3-dots and go into YAML mode and see if looks more like:

ssh:
  allow_agent_forwarding: false
  allow_remote_port_forwarding: false
  allow_tcp_forwarding: false
  ....

Iā€™m not sure, but the log has two ssh keys. I think there should only be one

Need some help with this configuration:

allow_agent_forwarding: false
allow_remote_port_forwarding: false
allow_tcp_forwarding: false
authorized_keys:
  - >-
    ssh-rsa
    REDACTION
    rsa-key-20190317
compatibility_mode: false
password: ""
sftp: false
username: tom
log_level: debug
zsh: false
init_commands:
  - >-
    echo 'EXINIT="set showmatch ignorecase" ; export EXINIT ; cd
    /config/appdaemon/apps' >/root/.bashrc

I am trying to use the regular bash shell and create the /root/.bashrc file to set an environment variable, but .bashrc does NOT get created. Iā€™m sure Iā€™m probably missing something very basic here - but any ideas?

Thank you

@rinseaidā€™s post with init_commands to enable RSA auth for public keys worked for me as well. Thanks!

Used the YAML editing mode for the addon config.

Always satisfying when I get another SSH host working with the PGP/SSH auth key on my Yubikey.

" audio, uart/serial devices and GPIO pins" - but is there any possibility to have access to usb disks? like, mounting, editingā€¦?

Hi guys,
I really hope someone can help me. I used to use this add-on for backing up my config to GitHub through a shell command. For some reason that didnā€™t work anymore, and I ended up uninstalling the add-on.
However, after reinstalling the add-on, it just wont start.
So it installs.
My config is as follows:

allow_agent_forwarding: false
allow_remote_port_forwarding: false
allow_tcp_forwarding: false
authorized_keys: []
compatibility_mode: false
password: GitHubBackUpNeeded10022023!
sftp: false
username: GitPushBackup

And the add-on log shows this:

s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
 Add-on: SSH & Web Terminal
 SSH & Web Terminal access to your Home Assistant instance
-----------------------------------------------------------
 Add-on version: 13.0.2
 You are running the latest version of this add-on.
 System: Home Assistant OS 9.5  (amd64 / qemux86-64)
 Home Assistant Core: 2023.2.3
 Home Assistant Supervisor: 2023.01.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-user: starting
s6-rc: info: service init-ssh: starting
s6-rc: info: service init-mysql: starting
s6-rc: info: service init-mosquitto: starting
s6-rc: info: service init-docker: starting
[21:47:45] INFO: Docker support has been enabled.
s6-rc: info: service init-docker successfully started
s6-rc: info: service init-mosquitto successfully started
s6-rc: info: service init-mysql successfully started
[21:47:45] NOTICE: Session sharing has been disabled!
s6-rc: info: service init-user successfully started
s6-rc: info: service ttyd: starting
s6-rc: info: service ttyd successfully started
[21:47:45] INFO: Starting the ttyd daemon...
[21:47:46] WARNING: 
[21:47:46] WARNING: Logging in with a SSH password is security wise, a bad idea!
[21:47:46] WARNING: Please, consider using a public/private key pair.
[21:47:46] WARNING: What is this? https://kb.iu.edu/d/aews
[21:47:46] WARNING: 
[21:47:46] NOTICE: RSA host key missing, generating one...
Generating public/private rsa key pair.
Your identification has been saved in /data/ssh_host_rsa_key
Your public key has been saved in /data/ssh_host_rsa_key.pub
The key fingerprint is:
SHA256:P1Lx6EHDE8oWjnYL+PmT3+8szcpMrKRQbX8BRYBtxBw root@a0d7b954-ssh
The key's randomart image is:
+---[RSA 3072]----+
|        . .*E+o  |
|     . + +..=.   |
|    . + * *..    |
|     o = + * .   |
|      o S * . .  |
|       o * +   . |
|      . = = +o.  |
|       . * B.oo  |
|        . o ==+  |
+----[SHA256]-----+
[21:47:48] NOTICE: ED25519 host key missing, generating one...
Generating public/private ed25519 key pair.
Your identification has been saved in /data/ssh_host_ed25519_key
Your public key has been saved in /data/ssh_host_ed25519_key.pub
The key fingerprint is:
SHA256:yKtflvDAIXonEi4QMVU7rKwyCsxiGuPk2ayR3vE60qs root@a0d7b954-ssh
The key's randomart image is:
+--[ED25519 256]--+
|+o...            |
| o . .           |
|. . = .          |
|.o + = o         |
|. * o B S        |
|oo.o o = .       |
|OB..  . =        |
|%=*oo. o         |
|oE+*=o.          |
+----[SHA256]-----+
s6-rc: info: service init-ssh successfully started
s6-rc: info: service sshd: starting
s6-rc: info: service sshd successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[21:47:53] INFO: Starting the SSH daemon...
Server listening on 0.0.0.0 port 622.
Server listening on :: port 622.

When checking in the supervisor logs it shows this:

23-02-10 21:46:35 INFO (MainThread) [supervisor.addons] Add-on 'a0d7b954_ssh' successfully installed
23-02-10 21:46:43 WARNING (MainThread) [supervisor.api.addons] Changing protected flag for a0d7b954_ssh!
23-02-10 21:46:44 INFO (MainThread) [supervisor.ingress] Update Ingress as panel for a0d7b954_ssh
23-02-10 21:47:22 WARNING (SyncWorker_0) [supervisor.docker.addon] SSH & Web Terminal running with disabled protected mode!
23-02-10 21:47:33 INFO (SyncWorker_0) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/ssh/amd64 with version 13.0.2
23-02-10 21:48:21 INFO (MainThread) [supervisor.host.info] Updating local host information
23-02-10 21:48:22 INFO (MainThread) [supervisor.host.services] Updating service information
23-02-10 21:48:22 INFO (MainThread) [supervisor.host.network] Updating local network information
23-02-10 21:48:22 INFO (MainThread) [supervisor.host.sound] Updating PulseAudio information
23-02-10 21:48:22 INFO (MainThread) [supervisor.host.manager] Host information reload completed

However, when I try to open the terminal in the web interface I get the error saying the add-on is not started:
image

And when checking the add-on itself it also still shows the ā€œstartā€ button. Clicking that gives the log entry that says the add-on is already started.

Can anyone please assist? Iā€™m breaking my head on this. I tried the config with an rsa-key but that doesnt change anything.

Never mind meā€¦ Apparently something was stuck in my HA install. Rebooting the vm solved my issues.

By mistake iā€™ve edited iptables with SSH & Web Terminal to DROP all INPUT, how can i open / add TCP port 8123 to the firewall?

@cartman-sp69, did you ever find a solution for your particular use case?

Hey there I need help.

I have installed the Add on SSH & Web Terminal and I canā€™t find where to add a user name and password.

Iā€™m on Raspberry Pi 4 running latest version of HA.

This is what I get when I open the config tab.

Any help would be mega.

How to get rid of this:

Schermata 2023-04-23 alle 17.37.38

Schermata 2023-04-23 alle 17.41.23

It makes my web terminal unreadableā€¦

Hi, yeah, I have the same issue, adding packages dient work indeed, I always need to install the manually, I also define if in the addon options like you do, no error in log, but the package is not installed

Have a look in the documentation: Home Assistant (palacehome.duckdns.org)

This section should be under SSH in the config.

  username: homeassistant
  password: ""
  authorized_keys:
    - ssh-rsa AASDJKJKJFWJFAFLCNALCMLAK234234.....
  sftp: false
  compatibility_mode: false
  allow_agent_forwarding: false
  allow_remote_port_forwarding: false
  allow_tcp_forwarding: false

This is what I have (slightly edited):

username: username
password: ""
authorized_keys:
  - >-
    ecdsa-sha2-nistp256<removed key details>ecdsa-key-20220118
sftp: true
compatibility_mode: false
allow_agent_forwarding: false
allow_remote_port_forwarding: false
allow_tcp_forwarding: false

There is no option for any thing in the config tab or should I be looking in a different place? The screen shot above is all I have

If you canā€™t fill in directly in the field, in the top right you have the 3 dots. Choose YAML and you should be able to edit.

Do you know if it is possible to edit config.txt from this addon? I need to enable a serial UART interface and I do not have physical access to the deviceā€¦

Back on Dec 22, Franck Nijhof (Admin) answered this question. As No, due tot he fact its config.txt is with in a docker container.
Franck was the author of much of HA and its add-ons and is a senior architech of Home Assistant.

People have said in this thread that they can not copy-n-paste. Just a question for those who cant. If you type CTRL-A ? in the terminal connected to HA, what do you see in the window? I use a MAC both ssh and Web terminal. If is type CTRL-A ? I see all the commands that are available from the Linux Terminal screen command and you need to learn how darn powerful this screen program is. Its has been around for decades when using text terminals for debug and systems admin operation is an awesome program.

Happy to help if I can. I started with UNIX back in the late 70s at SGI (Silicon Graphics) so there are many tricks that can be done with this screen program which is baked into the shell

I recently installed HA on an ODROID N2+, and added the Advanced SSH & Web Terminal Add-on. Both the SSH and Web Terminal seems to be functioning properly. But my system log frequently repeats:
WARNING (MainThread) [supervisor.addons.options] Unknown option ā€˜packagesā€™ for Advanced SSH & Web Terminal
What is this referring to? And, how do I fix whatever the issue is?
HAOS 10.1, core-2023.5.4, supervisor-2023.06.1

This thread is WAY WAY too long for it to be useful for finding information related to specific issue with this AddOn.