Skip to content

Instantly share code, notes, and snippets.

@meeuw
Created August 27, 2021 10:26
Show Gist options
  • Save meeuw/529205e77a6d1bed604ce97293a57524 to your computer and use it in GitHub Desktop.
Save meeuw/529205e77a6d1bed604ce97293a57524 to your computer and use it in GitHub Desktop.
script to test all ssh key in your ssh agent key ring, forces gnome-keyring to ask for a passphrase (and allows you to save it).
import hashlib
import paramiko
a = paramiko.agent.Agent()
for key in a.get_keys():
print(key.sign_ssh_data(hashlib.sha1(b'something to sign').digest()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment