I have a problem with the keyboard of my laptop which doesn't work properly anymore. However I have full control of the laptop via ssh. The problem is that I use a self encrypting disk (Samsung 840 Pro). If I turn the laptop of I will perhaps not be able to login anymore because of the keyboard issue (which is probably a hardware issue). So I want to turn of the ata-password via ssh and hdparm before rebooting, then I can put the SSD into another PC and access it without problems.
The problem with:
hdparm --security-disable password /dev/sda
however is that my laptop (Dell Latitude E6400, german keyboard) seems to translate the characters to scan codes, so I tried something like:
hdparm --security-disable $(printf 'password' | tr '1234567890qwertyuiopasdfghjklzxcvbnm' '\2-\13\20-\31\36-\46\54-\62') /dev/sda
as described here.
But this doesn't work and I guess the reason for this is that I need the correct scan-code translation (the one above seems to be for a us keyboard).
So how can I get the correct scan codes via ssh without typing the keys on my laptop?
Are there any other suggestions how to disable the password via ssh.