| Did this page help you? Yes No Tell us about it... |
Retrieves and decrypts the administrator password for the instances running Windows.
You must specify the key pair used to launch the instance.
![]() | Note |
|---|---|
The Windows password is only generated the first time an AMI is launched. It is not generated for rebundled AMIs or after the password is changed on an instance. The password is encrypted using the key pair that you provided. There is no SOAP or Query version of the Password generation and encryption takes a few moments. Please wait up to 15 minutes after launching an instance before trying to retrieve the generated password. |
The short version of this command is ec2gpass.
ec2-get-password
instanceId -k key_file
| Name | Description | Required |
|---|---|---|
|
|
A Windows instance ID. Type: String Default: None Example: i-9b76d0f3 |
Yes |
|
|
The file that contains the private key used to launch the instance. Type: String Default: None Example: -k windows-keypair.pem |
Yes |
| Option | Description |
|---|---|
|
|
Overrides the Region specified in the Default: The Example: |
|
|
Default: The Example: |
|
|
The private key to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
The X.509 certificate to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
Specifies a connection timeout (in seconds). Example: --connection-timeout 30 |
|
|
Specifies a request timeout (in seconds). Example: --request-timeout 45 |
|
|
Displays verbose output by showing the SOAP request and response on the command line. This is particularly useful if you are building tools to talk directly to our SOAP API. |
|
|
Displays column headers in the output. |
|
|
Shows empty columns as |
|
|
Do not display tags for tagged resources. |
|
|
Prints internal debugging information. This is useful to assist us when troubleshooting problems. |
|
|
Displays Help. |
|
|
If Example: |
The command returns a table that contains the following information:
The Windows administrator password
Amazon EC2 command line tools display errors on stderr.
This example returns the administrator password for the i-2574e22a instance.
PROMPT>ec2-get-password i-2574e22a -k windows-keypair.pemq96A40B9w