I know how to reboot my Mac running Lion via SSH and using the method of connecting, elevating via sudo to root and then sending the reboot command.
However I have a situation where the only device I can connect to currently is a router in my network that can do simple commands and only without interaction in a sense that I cannot send a command that then requires another step like an answer or elevation. Basically no prompting will work as it is not interactive.
So I'm wondering if I can send a reboot command to my Mac from this interface that will include all the required syntax in one string to define the computer by IP, what to do (reboot) and also who to run the command as, including the credentials of root that is required for rebooting via SSH.
Something like ssh root@192.168.1.24 -pw thisismypassword shutdown -r now
Is there any way to accomplish this?
I can ping my Mac from this router and see it's replying but I cannot ssh into it as I have no other device other than this router to connect via ssh from.
However I have a situation where the only device I can connect to currently is a router in my network that can do simple commands and only without interaction in a sense that I cannot send a command that then requires another step like an answer or elevation. Basically no prompting will work as it is not interactive.
So I'm wondering if I can send a reboot command to my Mac from this interface that will include all the required syntax in one string to define the computer by IP, what to do (reboot) and also who to run the command as, including the credentials of root that is required for rebooting via SSH.
Something like ssh root@192.168.1.24 -pw thisismypassword shutdown -r now
Is there any way to accomplish this?
I can ping my Mac from this router and see it's replying but I cannot ssh into it as I have no other device other than this router to connect via ssh from.