my_key: Default keypair

Description Usage Details Examples

View source: R/mykey.R

Description

Set a default keypair via USER_KEY and USER_PUKBEY variables.

Usage

1
2
3

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".

Examples

1
2
3
4
5
6
7
8
9
# 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())


openssl documentation built on May 19, 2017, 8:12 a.m.
Search within the openssl package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.