Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SendSerialConsoleSSHPublicKeyCommand

Pushes an SSH public key to the specified EC2 instance. The key remains for 60 seconds, which gives you 60 seconds to establish a serial console connection to the instance using SSH. For more information, see EC2 Serial Console in the Amazon EC2 User Guide.

example

Use a bare-bones client and the command you need to make an API call.

import { EC2InstanceConnectClient, SendSerialConsoleSSHPublicKeyCommand } from "@aws-sdk/client-ec2-instance-connect"; // ES Modules import
// const { EC2InstanceConnectClient, SendSerialConsoleSSHPublicKeyCommand } = require("@aws-sdk/client-ec2-instance-connect"); // CommonJS import
const client = new EC2InstanceConnectClient(config);
const command = new SendSerialConsoleSSHPublicKeyCommand(input);
const response = await client.send(command);
see

SendSerialConsoleSSHPublicKeyCommandInput for command's input shape.

see

SendSerialConsoleSSHPublicKeyCommandOutput for command's response shape.

see

config for EC2InstanceConnectClient's config shape.

Hierarchy

Implements

Index

Constructors

Properties

Constructors

constructor

Properties

Readonly input

input: SendSerialConsoleSSHPublicKeyCommandInput

Readonly middlewareStack