Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

pyssh2age

Latest version: v1.0.0

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
PyPI package Publisher: ivankra
0 Stars
0 Forks
1 Versions
Python Repo language

Scan summary

pyssh2age was last scanned on 29 Nov 2026 at version 1.0.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 29 Nov 2026.
  • Findings: No rules fired in version 1.0.0.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
1.0.0 LATEST 29 Nov 2026 No rules fired

No rules fired in 1.0.0

Findings

Findings for v1.0.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.0.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

pyssh2age

Convert SSH Ed25519 keys to age keys, e.g. for sops or sops-nix.

A single-file pure-Python port of ssh-to-age that produces the same keys. Python 3.9+, using only the standard library and ssh-keygen to decrypt passphrase-protected keys.

The conversion is the standard Ed25519 → X25519 mapping (explained here): the age secret is sha512(seed)[:32], and the age public key is the Montgomery u-coordinate of the Ed25519 public point, u = (1 + y) / (1 - y).

Install

$ pipx install pyssh2age    # or: uv tool install pyssh2age

This installs the pyssh2age command and ssh-to-age alias. Or copy src/pyssh2age.py anywhere and run it.

Usage

$ cat ~/.ssh/id_ed25519.pub | pyssh2age
age17044m9u...

$ pyssh2age -i ~/.ssh/id_ed25519.pub
age17044m9u...

$ ssh-keyscan host1 host2 | pyssh2age    # or authorized_keys, known_hosts
skipped key: got ssh-rsa key type, but only ed25519 keys are supported
age1hjm3au...
age1v8zjc4...

$ pyssh2age --private-key -i ~/.ssh/id_ed25519 -o key.txt    # see Security below

Decrypting passphrase-protected private keys needs a Unix-like system; everything else also works on Windows.

For a passphrase-protected key you're prompted on the terminal. In scripts, use --stdinpass or SSH_TO_AGE_PASSPHRASE:

$ systemd-ask-password | pyssh2age --private-key --stdinpass -i ~/.ssh/id_ed25519 -o key.txt

The age identity file (-o) is created with mode 0600, atomically replacing any existing file. As in the Go version, options work with one or two dashes.

Library

import pyssh2age

pyssh2age.ssh_public_key_to_age("ssh-ed25519 AAAA... me@host")    # "age1..."
pyssh2age.ssh_public_keys_to_age(open("authorized_keys").read())  # ["age1...", ...]

key = open("id_ed25519").read()
try:
    identity = pyssh2age.ssh_private_key_to_age(key)              # "AGE-SECRET-KEY-1..."
except pyssh2age.PassphraseRequired:
    identity = pyssh2age.ssh_private_key_to_age(key, passphrase="...")

Failures raise ConvertError; non-Ed25519 keys raise its subclass UnsupportedKeyType. Lower-level helpers: ed25519_public_to_x25519, ed25519_seed_to_x25519, x25519_public, age_recipient, age_identity.

Security

  • The age key is as powerful as the SSH key. The original id_ed25519 file you derived it from can't be recovered, but it is the Ed25519 signing scalar: whoever has it can sign as the SSH key and log in wherever that key is authorized.
  • Output file is written unencrypted (as in the Go version), even if the SSH key has a passphrase. Encrypt it with: pyssh2age --private-key ... | age -p -o key.txt.age.

Development

The tests need ssh-keygen and openssl, and also check results with age if it's installed:

$ python3 tests/test_pyssh2age.py
$ GO_SSH_TO_AGE=/path/to/ssh-to-age python3 tests/test_pyssh2age.py    # also compare with the Go version

License

MIT. Based on ssh-to-age by Jörg Thalheim.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases pyssh2age

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Frame 2085668439 (1)
Group 1261154229