user_config | R Documentation |
Resource configuration functions for a virtual machine deployment
user_config(username, sshkey = NULL, password = NULL) datadisk_config(size, name = "datadisk", create = "empty", type = c("StandardSSD_LRS", "Premium_LRS", "Standard_LRS", "UltraSSD_LRS"), write_accelerator = FALSE) image_config(publisher = NULL, offer = NULL, sku = NULL, version = "latest", id = NULL)
username |
For |
sshkey |
For |
password |
For |
size |
For |
name |
For |
create |
For |
type |
For |
write_accelerator |
For |
publisher, offer, sku, version |
For |
id |
For |
## Not run: ## user_config: SSH public key resource in Azure # create the resource keyres <- rg$create_resource(type="Microsoft.Compute/sshPublicKeys", name="mysshkey") # generate the public and private keys keys <- keyres$do_operation("generateKeyPair", http_verb="POST") keyres$sync_fields() # save the private key (IMPORTANT) writeBin(keys$privateKey, "mysshkey.pem") # create a new VM using the public key resource for authentication # you can then login to the VM with ssh -i mysshkey.pem <username@vmaddress> rg$create_vm("myvm", user_config("username", sshkey=keyres), config="ubuntu_20.04") ## user_config: SSH public key as a file rg$create_vm("myvm", user_config("username", sshkey="mysshkey.pub"), config="ubuntu_20.04") ## user_config: SSH public key as a string (read from a file) pubkey <- readLines("mysshkey.pub") rg$create_vm("myvm", user_config("username", sshkey=pubkey), config="ubuntu_20.04") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.