Skip to content

Instantly share code, notes, and snippets.

@victorusachev
Created February 9, 2024 18:42
Show Gist options
  • Save victorusachev/c96054d3ba6cd802e65a099c7d72feb0 to your computer and use it in GitHub Desktop.
Save victorusachev/c96054d3ba6cd802e65a099c7d72feb0 to your computer and use it in GitHub Desktop.
import sys
import paramiko
def main(hosts: list[str]) -> None:
for host in hosts:
transport = paramiko.transport.Transport((host, 22))
transport.start_client(timeout=1)
key = transport.get_remote_server_key()
print(key.get_base64())
if __name__ == '__main__':
main(sys.argv[1:])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment