You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-21Lines changed: 10 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ A picture is worth a thousand words:
24
24
25
25
### Demo with CloudFormation
26
26
27
-
1. Upload your public SSH key to IAM:
27
+
1. Upload your public SSH key to IAM:
28
28
1. Open the Users section in the [IAM Management Console](https://console.aws.amazon.com/iam/home#users)
29
29
2. Click the row with your user
30
30
3. Select the **Security Credentials** tab
@@ -37,24 +37,9 @@ A picture is worth a thousand words:
37
37
38
38
## How to integrate this system into your environment
39
39
40
-
### Install via RPM
41
-
42
-
> Check the [releases](https://github.com/widdix/aws-ec2-ssh/releases) and replace `1.1.0` with the latest released version.
43
-
44
-
1. Upload your public SSH key to IAM:
45
-
1. Open the Users section in the [IAM Management Console](https://console.aws.amazon.com/iam/home#users)
46
-
2. Click the row with your user
47
-
3. Select the **Security Credentials** tab
48
-
4. Click the **Upload SSH public key** button at the bottom of the page
49
-
5. Paste your public SSH key into the text-area and click the **Upload SSH public key** button to save
50
-
2. Attach the IAM permissions defined in [`iam_ssh_policy.json`](./iam_ssh_policy.json) to the EC2 instances (by creating an IAM role and an Instance Profile)
51
-
3. Install the RPM: `rpm -i https://s3-eu-west-1.amazonaws.com/widdix-aws-ec2-ssh-releases-eu-west-1/aws-ec2-ssh-1.4.0-1.el7.centos.noarch.rpm`
52
-
4. The configuration file is placed into `/etc/aws-ec2-ssh.conf`
53
-
5. The RPM creates a crontab file to run import_users.sh every 10 minutes. This file is placed in `/etc/cron.d/import_users`
54
-
55
40
### Install via install.sh script
56
41
57
-
1. Upload your public SSH key to IAM:
42
+
1. Upload your public SSH key to IAM:
58
43
1. Open the Users section in the [IAM Management Console](https://console.aws.amazon.com/iam/home#users)
59
44
2. Click the row with your user
60
45
3. Select the **Security Credentials** tab
@@ -88,14 +73,19 @@ Linux user names may only be up to 32 characters long.
88
73
89
74
## Configuration
90
75
91
-
There are a couple of things you can configure by editing/creating the file `/etc/aws-ec2-ssh.conf` and adding
92
-
one or more of the following lines:
76
+
The multi AWS Account Role can configure by editing/creating the file `/etc/aws-ec2-ssh.conf` and adding
77
+
the following line:
93
78
94
79
```
95
80
ASSUMEROLE="IAM-role-arn" # IAM Role ARN for multi account. See below for more info
81
+
```
82
+
83
+
There are a couple of things you can configure by creating ENVIRONMENT variables:
84
+
85
+
```
96
86
IAM_AUTHORIZED_GROUPS="GROUPNAMES" # Comma separated list of IAM groups to import
97
87
SUDOERS_GROUPS="GROUPNAMES" # Comma seperated list of IAM groups that should have sudo access
98
-
IAM_AUTHORIZED_GROUPS_TAG="KeyTag" # Key Tag of EC2 that contains a Comma separated list of IAM groups to import - IAM_AUTHORIZED_GROUPS_TAG will override IAM_AUTHORIZED_GROUPS, you can use only one of them
88
+
IAM_AUTHORIZED_GROUPS_TAG="KeyTag" # Key Tag of EC2 that contains a Comma separated list of IAM groups to import - IAM_AUTHORIZED_GROUPS_TAG will override IAM_AUTHORIZED_GROUPS, you can use only one of them
99
89
SUDOERS_GROUPS_TAG="KeyTag" # Key Tag of EC2 that contains a Comma separated list of IAM groups that should have sudo access - SUDOERS_GROUPS_TAG will override SUDOERS_GROUPS, you can use only one of them
100
90
SUDOERSGROUP="GROUPNAME" # Deprecated! IAM group that should have sudo access. Please use SUDOERS_GROUPS as this variable will be removed in future release.
101
91
LOCAL_MARKER_GROUP="iam-synced-users" # Dedicated UNIX group to mark imported users. Used for deleting removed IAM users
@@ -146,5 +136,4 @@ For your EC2 instances, you need a IAM role that allows the `sts:AssumeRole` act
146
136
* uid's and gid's across multiple servers might not line up correctly (due to when a server was booted, and what users existed at that time). Could affect NFS mounts or Amazon EFS.
147
137
* this solution will work for ~100 IAM users and ~100 EC2 instances. If your setup is much larger (e.g. 10 times more users or 10 times more EC2 instances) you may run into two issues:
148
138
* IAM API limitations
149
-
* Disk space issues
150
139
***not all IAM user names are allowed in Linux user names** (e.g. if you use email addresses as IAM user names). See section [IAM user names and Linux user names](#iam-user-names-and-linux-user-names) for further details.
0 commit comments