Reprodition method:
There is a line break(\n) at the end of the SSH public key, which will result in the following error.
Specified SSH key is not eligible for claiming. Only RSA and Ed25519 keys are supported for proof generation.
Use print to output the parameters in decrypt_temp_eth_account.
def decrypt_temp_eth_account(sshPubKey, sshPrivKey, username, metadata):
+ print(sshPubKey, sshPrivKey, username, metadata.encryptedKeys[username])
if sshPubKey not in metadata.encryptedKeys[username]:
error("Specified SSH key is not eligible for claiming. Only RSA and Ed25519 keys are supported for proof generation.")
data = metadata.encryptedKeys[username][sshPubKey]
result = subprocess.run(["age",
"--decrypt",
"--identity",
sshPrivKey],
capture_output=True,
input=data.encode(),
env=env)
if result.returncode != 0:
raise OSError(result.stderr)
return w3.eth.account.from_key(result.stdout.decode())
Reprodition method: There is a line break
(\n)
at the end of the SSH public key, which will result in the following error.Use
print
to output the parameters indecrypt_temp_eth_account
.Debugging screenshot: