Learn R Programming

paws.compute (version 0.1.12)

ec2instanceconnect_send_ssh_public_key: Pushes an SSH public key to a particular OS user on a given EC2 instance for 60 seconds

Description

Pushes an SSH public key to a particular OS user on a given EC2 instance for 60 seconds.

Usage

ec2instanceconnect_send_ssh_public_key(InstanceId, InstanceOSUser,
  SSHPublicKey, AvailabilityZone)

Value

A list with the following syntax:

list(
  RequestId = "string",
  Success = TRUE|FALSE
)

Arguments

InstanceId

[required] The EC2 instance you wish to publish the SSH key to.

InstanceOSUser

[required] The OS user on the EC2 instance whom the key may be used to authenticate as.

SSHPublicKey

[required] The public key to be published to the instance. To use it after publication you must have the matching private key.

AvailabilityZone

[required] The availability zone the EC2 instance was launched in.

Request syntax

svc$send_ssh_public_key(
  InstanceId = "string",
  InstanceOSUser = "string",
  SSHPublicKey = "string",
  AvailabilityZone = "string"
)

Examples

Run this code
if (FALSE) {
# The following example pushes a sample SSH public key to the EC2 instance
# i-abcd1234 in AZ us-west-2b for use by the instance OS user ec2-user.
svc$send_ssh_public_key(
  AvailabilityZone = "us-west-2a",
  InstanceId = "i-abcd1234",
  InstanceOSUser = "ec2-user",
  SSHPublicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3FlHqj2eqCdrGHuA6d..."
)
}

Run the code above in your browser using DataLab