How to create a Command line switch that use ssh to send command to Asus router?

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 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.

Hello there,
You will first need to get the SSH keys working. Please follow the instructions here in this post How I got Asuswrt device tracker working with SSH key files
Once your SSH is set up correctly, try to access the router using your private key. For this I would recommend using the “SSH & Web Terminal” official addon using the below command:

ssh -i /config/ssh_keys/asus_router -o StrictHostKeyChecking=no [email protected]

Here is your router’s IP.