Skip to content
This repository was archived by the owner on Nov 14, 2021. It is now read-only.
This repository was archived by the owner on Nov 14, 2021. It is now read-only.

[Question] Is this a valid and safe approach? #8

Description

@Skeeve

Some programs accept credentials in environment Variables.

My approach is described below.

My question: Is this a valid and safe approach?

  1. Create an encrypted string of the environment settings:

    sshcrypt agent-encrypt <<HERE
    export USERNAME=username
    export PASSWORD=password
    HERE
  2. Different approaches possible
    a. Put it into a file mycredentials like this

$( sshcrypt agent-decrypt <<'EOF'
THE CRYPTED STRING HERE
EOF
)

source that file when the credentials are required

source ~/mycredentials
programs requiring credentials

b. Put a credentials-variable into your shell-startup

MY_CREDENTIALS='THE CRYPTED STRING HERE'

Decrypt when required:

$( sshcrypt agent-decrypt <<<$MY_CREDENTIALS )
programs requiring credentials

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions