I would like to create a button on my Home Assistant dashboard to SSH into my a device on my network and send two commands. To do this, I need to SSH into the device, which I have a username and password for (no SSH key). After initiating the connection, I need to send two consecutive commands.
What is the best way to achieve this? I have tried searching for how to do this, but most forum threads have info on either using an SSH key or how a single command is sent.
With the commands, where exactly do I enter them to make it easily automatable? Also, I am having trouble finding the exact commands that I need to run. As I said in the OP, I have come across forum threads where the ssh command is run with a reference to the ssh key file, but in my case, I have to enter credentials. Does the entering of the username and password need two extra commands?
I would also appreciate a specific name of the commands that I have to enter for this ssh process, at least enough to try and google the commands and figure out the syntax and stuff myself. I am fairly new to this world of Linux and CLI, so please excuse me if my questions have really easy solutions.