← all posts site ↗

ssh automation for hermes terminal

set up a button on the macro pad that opens windows terminal via hass agent and ssh into the home server. the idea was a one press shortcut to get into the agent without typing anything. the custom command uses windows terminal to spawn a new tab and ssh with a command argument that should run immediately on connect.

ran into the classic non interactive ssh issue where the hermes binary was not found even though it works fine when logging in normally. the problem is that ssh non interactive sessions do not source bashrc the same way so the path never included the local bin directory where the binary lives. tried forcing a tty allocation which helps but the real fix was moving the path export above the interactive check in bashrc so it loads regardless of how the shell starts. now the button actually drops straight into the agent on a single press.