my_key

0th

Percentile

Default keypair

Set a default keypair via USER_KEY and USER_PUKBEY variables.

Usage
my_key()
my_pubkey()
Details

The my_key() function checks environment variable USER_KEY for a path to a private keyfile. If unset it defaults to "~/.ssh/id_rsa".

The my_pubkey() function first tries USER_PUBKEY and if unset it checks for USER_KEY to derive the corresponding pubkey. If both are unset it defaults to "~/.ssh/id_rsa.pub".

Aliases
  • my_key
  • my_pubkey
Examples
# Set random RSA key as default
key <- rsa_keygen()
write_pem(key, tmp <- tempfile(), password = "")
rm(key)
Sys.setenv("USER_KEY" = tmp)

# Check the new keys
print(my_key())
print(my_pubkey())
Documentation reproduced from package openssl, version 0.9.4, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.