If keyboard is locked you can try also enable/install ssh server and login through it from another machine, and run the command.
If keyboard is locked you can try also enable/install ssh server and login through it from another machine, and run the command.