iam-get-ssh-keys

command module
v0.0.0-...-e71f07f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 7 Imported by: 0

README

iam-get-ssh-keys

Retrieve SSH keys for an user in AWS IAM

Usage

Get active SSH keys:

iam-get-ssh-keys USERNAME

Integrate with OpenSSH server:

AuthorizedKeysCommand /usr/bin/iam-get-ssh-keys %u
AuthorizedKeysCommandUser nobody

Don't forget to add the following policy to the role attached to your EC2 instance:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "iam:ListSSHPublicKeys",
                "iam:GetSSHPublicKey"
            ],
            "Resource": "*"
        }
    ]
}

Important

This is a proof of concept. Not ready for production use.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL