I don’t have experience for Linux nor ssh before, I’m a Mac/Win GUI user.
Recently bought a VPN service that I already set up on my Asus router (AC-68U with Asuswrt-Merlin), and I want to eventually create a Command Line Switch that can switch on/off the VPN, maybe set up a physical button to it afterward.
Since I never understand what’s ssh before, I read a lot online today, and managed to use Xshell on win10 to login the router and turn on/off the VPN, I initially use id and password to do it, and learned how to create public/private key to login router using Xshell on win10.
So now it’s part I put those command to Hassio, I ref some article like this to use Hassio to ssh to my router, basically I copy private key file to /config/ssh, and run the same command on Hassio as I run on Xshell, but it didn’t work.
Here is my setting in Asuswrt-Merlin:
And I use “File Editor” add-on on Hassio, there is a command line tool in it, since I don’t know where I can use command line other else in Hassio. Here is the command and the result I get.
ssh -i /config/ssh/id_rsa_1024 [email protected] -p 1111
Command executed: ssh -i /config/ssh/id_rsa_1024 [email protected] -p 1111: 255
Pseudo-terminal will not be allocated because stdin is not a terminal.
Permission denied, please try again.
Connection closed by 10.0.1.1 port 1111
System spec:
HassOS 4.13 on Pi3
Asus AC68U with Asuswrt-Merlin
I don’t know where am I doing it wrong, how can I do to achieve what I want to do?
Thanks very much.