Usage
rsa_keygen(dir = here::here("_ssh"), password = NULL, bits = 2048)Arguments
- dir
(optional) A
characterstring specifying the directory to save the generated keys (default:here::here("_ssh"))- password
(optional) A
characterstring specifying the password to protect the private key. IfNULL, the private key will not be protected (default:NULL).- bits
(optional) An integer number specifying the length of the RSA key in bits (default:
4096).
Value
An invisible NULL. This function is called
for side effects only.
Examples
temp_dir <- tempfile("dir")
dir.create(temp_dir)
temp_dir |>
rsa_keygen(
password = "test",
bits = 2048
)
#> ℹ Keys successfully created at /tmp/Rtmpu67Iup/dir19f64b016b22.
list.files(temp_dir)
#> [1] "id_rsa" "id_rsa.pub"