widdix / aws-ec2-ssh

Manage AWS EC2 SSH access with IAM

Home Page:https://cloudonaut.io/manage-aws-ec2-ssh-access-with-iam/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RPM on Centos 7.4 broken: Ec2 Permission denied

cloudvant opened this issue · comments

Operating System: Centos 7.4
AWS CLI Version: aws-cli/1.14.30 Python/2.7.5 Linux/3.10.0-693.11.6.el7.x86_64 botocore/1.8.34

SSHD AthorizedKeyCommand does not work, the response is always permission denied.

The key has been uploaded to IAM and I've used ssh-add to add the key to the agent.

What I tried:

  • running under "sudo -su nobody" "/usr/bin/authorized_keys_command.sh user" works. The right key is returned from IAM
  • Tried all the options fro here: https://gist.github.com/sivel/c68f601137ef9063efd7
  • If I copy the pub key in ~/.ssh/authorized_keys works

Hi @vmendoza

  1. Which installation method have you used?
  2. What error do you get? Please copy and paste the message

I used the RPM method to install.

  • It looks like Centos / RHEL 7.4 works differently than other versions
  • I have Cybereason for intrusion protection that might be blocking this but I doubt it.

The RPM only works on Amazon Linux at the moment. This is work in progress and will change soon.

duplicate of #115