Git Product home page Git Product logo

ssh-keypair-gen's Introduction

SSH Keypair Generator

This Go utility automatically generates a cryptographically stable RSA SSH key pair and outputs the public and private keys.

Installation

To install and use the SSH keygen utility, follow these steps:

  1. Install Go and set up your Go environment. See the Go installation guide for more information.

  2. Clone this repository:

    git clone https://github.com/sv222/ssh-keypair-gen.git
    cd ssh-keypair-gen
  3. Build the binary:

    go build -o ssh-keypair-gen

Usage

Local installation

  1. Run the binary with the desired flags. For example, to generate a 4096-bit key and save the private key as mykey.pem and the public key as mykey.pub, run the following command:

    ./ssh-keypair-gen --size 4096 --private-key mykey.pem --public-key mykey.pub

You can choose not to pass values, then the names will be given by default and the files will be saved in the current folder.

./ssh-keypair-gen

Docker installation

  1. Build the Docker image:

    docker build -t ssh-keypair-gen .
  2. Run the Docker container with the desired flags. For example, to generate a 4096-bit key and save the private key as mykey.pem and the public key as mykey.pub, run the following command:

    docker run -v $(pwd):/keys ssh-keypair-gen --private-key /keys/id_rsa.pem --public-key /keys/id_rsa.pub

The above command uses the -v flag to mount the current directory as a volume inside the container, and the -w flag to set the working directory inside the container to /app, which is where the binary and output files are located.

Replace "my-go-app" with the name you gave to the Docker image when you built it.

Contribution

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

ssh-keypair-gen's People

Contributors

sv222 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.