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

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 192.168.1.1 is your router’s IP.