Skip to content
This repository was archived by the owner on Nov 8, 2021. It is now read-only.

Commit 66fbabd

Browse files
committed
added notes about RPM install
1 parent 4a1b883 commit 66fbabd

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,28 @@ A picture is worth a thousand words:
3737

3838
## How to integrate this system into your environment
3939

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` to the EC2 instances (by creating an IAM role and an Instance Profile)
51+
3. Install the RPM: `rpm -i ttps://s3-eu-west-1.amazonaws.com/widdix-aws-ec2-ssh-releases-eu-west-1/aws-ec2-ssh-1.1.0-1.el7.centos.noarch.rpm`
52+
4. The configuration file is placed into `/etc/aws-ec2-ssh.conf`
53+
5. Install a cronjob to sync the IAM users
54+
```
55+
echo "*/10 * * * * root /usr/bin/import_users.sh" > /etc/cron.d/import_users
56+
chmod 0644 /etc/cron.d/import_users
57+
/usr/bin/import_users.sh
58+
```
59+
60+
### Install via install.sh script
61+
4062
1. Upload your public SSH key to IAM:
4163
1. Open the Users section in the [IAM Management Console](https://console.aws.amazon.com/iam/home#users)
4264
2. Click the row with your user

aws-ec2-ssh.spec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ Use your IAM user's public SSH key to get access via SSH to an EC2 instance.
3434
%install
3535
rm -rf ${RPM_BUILD_ROOT}
3636
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
37-
mkdir -p ${RPM_BUILD_ROOT}/etc/sysconfig
3837
install -m 755 import_users.sh ${RPM_BUILD_ROOT}%{_bindir}
3938
install -m 755 authorized_keys_command.sh ${RPM_BUILD_ROOT}%{_bindir}
4039
install -m 755 aws-ec2-ssh.conf ${RPM_BUILD_ROOT}/etc/aws-ec2-ssh.conf

0 commit comments

Comments
 (0)