Skip to content

Conversation

@DevonTM
Copy link

@DevonTM DevonTM commented Jul 14, 2025

Summary
This PR improves the usability of the gssh build of tiny-frpc by removing its dependency on pre-existing SSH key files. Previously, gssh build would attempt to read a private key from $HOME/.ssh/id_rsa, which could fail in minimal or embedded environments where:

  • OpenSSH or other key generation tools are not installed
  • No user-specific .ssh directory exists
  • No pre-generated key has been provided

What's changed
When using the gssh build, if no private key (id_ed25519) is found:

  • The client will automatically generate an ED25519 key pair
  • The keys are stored in the same directory as the tiny-frpc executable
  • The gssh build now reads the private key from id_ed25519 in the same directory as the executable, instead of from $HOME/.ssh/id_rsa

Benefits

  • Fully self-contained operation in minimal environments (e.g. OpenWRT, containers, custom init systems)
  • No requirement for external key generation tools
  • Secure by default with ED25519
  • Simplifies deployment and scripting

Notes

  • Only affects the gssh build mode
  • Does not interfere with existing manually-provided keys
  • ED25519 was chosen due to its smaller size, faster generation, and strong security

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant