aws ec2-instance-connect send-ssh-public-key

Pushes an SSH public key to the specified EC2 instance for use by the specified user. The key remains for 60 seconds. For more information, see Connect to your Linux instance using EC2 Instance Connect in the Amazon EC2 User Guide

Options

NameDescription
--instance-id <string>The ID of the EC2 instance
--instance-os-user <string>The OS user on the EC2 instance for whom the key can be used to authenticate
--ssh-public-key <string>The public key material. To use the public key, you must have the matching private key
--availability-zone <string>The Availability Zone in which the EC2 instance was launched
--cli-input-json <string>Performs service operation based on the JSON string provided. The JSON string follows the format provided by ``--generate-cli-skeleton``. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally
--generate-cli-skeleton <string>Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value ``input``, prints a sample input JSON that can be used as an argument for ``--cli-input-json``. If provided with the value ``output``, it validates the command inputs and returns a sample output JSON for that command