Creating snapshot remotely using ssh

I’m following this guide to remotely backup snapshots:

I’ve got ssh setup without needing a password and can ssh straight into HA, with no problems.
A line in the script that needs to be executed is:
‘ssh hassio ha snapshots new’ (hassiso is the alias for the IP address of HA.)

It appears that ‘ha snapshots new’ is not executed, with the follow error returned:
“time=“2020-06-29T12:51:35+01:00” level=error msg=Unexpected server response”

Does anyone have an idea what may be wrong, please?
Jim

1 Like

Unfortunately no help from my side. Only a note that I’m seeing the same issue. The first time I tried this it worked flawlessly, now it doesn’t.

The first part “ssh hassio” works fine and logs me into the pi.
The second part “ha snapshot new” works fine when executed on the pi shell.
Together they give me the same error with a different timestamp of course.

Thanks for the reply ‘Flip’.

I now execute each command in it’s own shell - swapping from the pi to my laptop. It’s clumsy, but works!

Jim

Subsequent to my message above, I searched the net and came across this addon:


I’ve installed it and it appears to work well.
Jim
1 Like

My friend @pyrech has found the solution. Here is the solution with explanations : Shortcut SSH to restart HA: Not authorized

1 Like