Home Assistant Community Add-on: SSH & Web Terminal

It doesn’t on mine either. You are using the terminal inside HA? I had no issue with ssh and windows which I thought Mariusthvdb was using.

Yea, this is using the addon within HA. I’m using Chrome, if that makes a difference maybe?

I am using chrome as well.

I finally made it in a regular terminal SSH window with -p 22222 and am able to run the docker command now required for the py-spy recordings…

so nice to be able to simply cut and paste from those.

tried that too, and unfortunately;y no, same result (on a Mac btw, that might be important…)

the enormous power of this Add-on (which without the c&p issue would have been ideal for the task) makes me take it off off the system again now.

thanks for your efforts in trying to help me!

So ssh’ing to the host? I think the problem is the rubbish zsh shell in the addon

I just tried it today with the shift key and it worked. I was able to copy and paste.

well, I give up. Had a final hunch it might be my theme settings (have some code variables set for the template editor, figured they might also affect the SSH window), but that wasnt the case.

Ive tried 3 browsers on my Mac: Safari, Chrome and Firefox, and the 2 available add-ons. Simply doesnt work.
Ive even switched the mouse from left to right, and adapted the left-click. No such thing. It simply wont recognize the Shift key as a special key when selecting text.

It works without any trouble in the standalone Terminal window. and I can use that as regular shell in (22) and as -p 22222 shell into the Host.

guess David is correct… :wink:

I’m having the same problem.

Log:

Unable to negotiate with 192.168.178.11 port 64029: no matching host key type found. Their offer: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss [preauth]

I’m using Transmit for iOS that may not be using the latest crypto stuff, I just want to use sftp. I already activated compatibility mode, is there a way to make this usable again?

Greets, Sören

Sorry were you communicating with me?
@pattyland I’m sorryI didnt find a resolution. Some pieces of equipment cannot be updated as they are proprietary but play crucial roles in terms of networking and I am not production level so it would be great if I could find an answer

Hello!
I read in the changes that the hassio.addon_stdin service no longer works.
Can you find a solution to run this command? (Required for automation)
sudo catt -d 'Google Nest Hub' cast_site https://xxx.duckdns.org:8123/xxx/xxx?kiosk

CATT set, SSH key set, runs perfectly from terminal.

The bash runs perfectly from the terminal. I made a switch for it:

switch:
  - platform: command_line
    scan_interval: 60
    switches:
      cast_living_room_dash:
        friendly_name: "Cast living room dashboard"
        command_on: "ssh -o StrictHostKeyChecking=no -i /config/ssh/rsa_key [email protected] 'bash config/shell/cast-living-room-dash-start.txt'"
        command_off: "ssh -o StrictHostKeyChecking=no -i /config/ssh/rsa_key [email protected] 'bash config/shell/cast-living-room-dash-stop.txt'"

after pressing the switch, in the terminal log:

debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
debug1: sshd version OpenSSH_9.0, OpenSSL 1.1.1o  3 May 2022
debug1: private host key #0: ssh-rsa SHA256:wb/F6mNCRO3/Uy6uVJnknRcmCP40Twtm+urySamLgUk
debug1: private host key #1: ssh-ed25519 SHA256:PjjUWxKHErjRq307xtWX6SjV1Qcfg8tKHXseyg3BZYQ
debug1: inetd sockets after dupping: 3, 3
Connection from 192.168.31.10 port 60528 on 192.168.31.10 port 22 rdomain ""
debug1: Local version string SSH-2.0-OpenSSH_9.0
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.6
debug1: compat_banner: match: OpenSSH_8.6 pat OpenSSH* compat 0x04000000
debug1: permanently_set_uid: 22/22 [preauth]
debug1: ssh_sandbox_child: prctl(PR_SET_SECCOMP): Invalid argument [preauth]
debug1: list_hostkey_types: rsa-sha2-512,rsa-sha2-256,ssh-ed25519 [preauth]
debug1: SSH2_MSG_KEXINIT sent [preauth]
debug1: SSH2_MSG_KEXINIT received [preauth]
debug1: kex: algorithm: [email protected] [preauth]
debug1: kex: host key algorithm: ssh-ed25519 [preauth]
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none [preauth]
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none [preauth]
debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]
debug1: SSH2_MSG_KEX_ECDH_INIT received [preauth]
debug1: rekey out after 134217728 blocks [preauth]
debug1: SSH2_MSG_NEWKEYS sent [preauth]
debug1: Sending SSH2_MSG_EXT_INFO [preauth]
debug1: expecting SSH2_MSG_NEWKEYS [preauth]
debug1: SSH2_MSG_NEWKEYS received [preauth]
debug1: rekey in after 134217728 blocks [preauth]
debug1: KEX done [preauth]
debug1: userauth-request for user hassio service ssh-connection method none [preauth]
debug1: attempt 0 failures 0 [preauth]
debug1: userauth-request for user hassio service ssh-connection method publickey [preauth]
debug1: attempt 1 failures 0 [preauth]
debug1: userauth_pubkey: publickey test pkalg rsa-sha2-512 pkblob RSA SHA256:dO8dQ2amLqVE7bYqh9RfNnBSfwcPozbskSYRCsmpew8 [preauth]
debug1: temporarily_use_uid: 1000/1000 (e=0/0)
debug1: trying public key file /etc/ssh/authorized_keys
debug1: fd 4 clearing O_NONBLOCK
debug1: /etc/ssh/authorized_keys:1: matching key found: RSA SHA256:dO8dQ2amLqVE7bYqh9RfNnBSfwcPozbskSYRCsmpew8
debug1: /etc/ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
Accepted key RSA SHA256:dO8dQ2amLqVE7bYqh9RfNnBSfwcPozbskSYRCsmpew8 found at /etc/ssh/authorized_keys:1
debug1: restore_uid: 0/0
Postponed publickey for hassio from 192.168.31.10 port 60528 ssh2 [preauth]
debug1: userauth-request for user hassio service ssh-connection method publickey [preauth]
debug1: attempt 2 failures 0 [preauth]
debug1: temporarily_use_uid: 1000/1000 (e=0/0)
debug1: trying public key file /etc/ssh/authorized_keys
debug1: fd 4 clearing O_NONBLOCK
debug1: /etc/ssh/authorized_keys:1: matching key found: RSA SHA256:dO8dQ2amLqVE7bYqh9RfNnBSfwcPozbskSYRCsmpew8
debug1: /etc/ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
Accepted key RSA SHA256:dO8dQ2amLqVE7bYqh9RfNnBSfwcPozbskSYRCsmpew8 found at /etc/ssh/authorized_keys:1
debug1: restore_uid: 0/0
debug1: auth_activate_options: setting new authentication options
Accepted publickey for hassio from 192.168.31.10 port 60528 ssh2: RSA SHA256:dO8dQ2amLqVE7bYqh9RfNnBSfwcPozbskSYRCsmpew8
debug1: monitor_child_preauth: user hassio authenticated by privileged process
debug1: auth_activate_options: setting new authentication options [preauth]
debug1: monitor_read_log: child log fd closed
User child is on pid 426
debug1: permanently_set_uid: 1000/1000
debug1: rekey in after 134217728 blocks
debug1: rekey out after 134217728 blocks
debug1: ssh_packet_set_postauth: called
debug1: active: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Entering interactive session for SSH2.
debug1: server_init_dispatch
debug1: server_input_channel_open: ctype session rchan 0 win 2097152 max 32768
debug1: input_session_request
debug1: channel 0: new [server-session]
debug1: session_new: session 0
debug1: session_open: channel 0
debug1: session_open: session 0: link with channel 0
debug1: server_input_channel_open: confirm session
debug1: server_input_global_request: rtype [email protected] want_reply 0
debug1: server_input_channel_req: channel 0 request exec reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req exec
Starting session: command for hassio from 192.168.31.10 port 60528 id 0
debug1: Received SIGCHLD.
debug1: session_by_pid: pid 427
debug1: session_exit_message: session 0 channel 0 pid 427
debug1: session_exit_message: release channel 0
Received disconnect from 192.168.31.10 port 60528:11: disconnected by user
Disconnected from user hassio 192.168.31.10 port 60528
debug1: do_cleanup
debug1: do_cleanup
[07:54:14] WARNING: sshd crashed, halting add-on
[07:54:14] INFO: sshd stoped, restarting...
s6-rc: info: service legacy-services: stopping
[2022/06/28 07:54:14:6729] N: received signal: SIGTERM (15), exiting...
[2022/06/28 07:54:14:6730] N: send ^C to force exit.
[07:54:14] INFO: sshd stoped, restarting...
s6-svwait: fatal: supervisor died
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
[07:54:14] INFO: ttyd stoped, restarting...
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Where is the mistake?

Don’t worry, my problem was just very similat to yours. I would like an advice from one of the plugins maintainers if possible

How do I configure properly so I can login as “root” to port 22222? I need to do so so that I can enable trim for my ssd.

I am unable to save the configuration with a blank password and setting the port to 22222 results in 502: Bad Gateway

see the documentation here

You don’t use the addon for this

1 Like

Hello,
After upgrading the add-on to 9.6 (prior 9.4), I can’t connect with my private key anymore. Rollback and all is working. Do you know why ?

[edit] May be I’m in the wrong post , I’m using Terminal & SSH add-on.

1 Like

Also for me, private key has stopped working, unfortunately:-(

1 Like

Same here, I thought it was the core update because it was working for me until I updated the HA Core and supervisor.

*edit - Using just the password and no key does work just for troubleshooting.

1 Like

What kind of key? Rsa? Check the addon log is it rejecting an RSA key? I changed my key to ESD and it works…

1 Like

What kind of key? Rsa? Check the addon log is it rejecting an RSA key? I changed my key to ESD and it works…

Yep, that was it. Just needed to update my ancient key. Thanks.

1 Like

I have no idea why they changed that. If I try and ssh out to another host when using the addon from the command line it won’t accept an ESD key for that other host and will only accept an RSA key… Took me forever to troubleshoot this.

Using also rsa keys. Thanks to point this into the light.