widdix / aws-ec2-ssh

Manage AWS EC2 SSH access with IAM
https://cloudonaut.io/manage-aws-ec2-ssh-access-with-iam/
MIT License
828 stars 289 forks source link

Enhancement/centos6 support #132

Closed artburkart closed 1 year ago

artburkart commented 6 years ago

I'm not sure whether there'd be any interest in adding CentOS 6 support, but this commit introduces an alternative method of enabling AuthorizedKeysCommand without disabling SELinux entirely that acts as a fallback when nis_enabled is not a valid variable to set.

Additionally, since you can't upgrade openssh-server to be > 6.1 on CentOS 6, these changes use AuthorizedKeysCommandRunAs rather than AuthorizedKeysCommandUser. The way I determined whether AuthorizedKeysCommandUser was available by greping the sshd binary for the string. For some reason, I can't do the same for AuthorizedKeysCommandRunAs. I don't know where it's hiding.

Let me know what you think.

michaelwittig commented 6 years ago

Hi @artburkart

Does this PR also includes #31 ?

I have no idea about SELinux, so let's see if someone watches this and can review it...

artburkart commented 6 years ago

I also just noticed https://github.com/widdix/aws-ec2-ssh/issues/97#issuecomment-358658386, which would mean I need to update the spec before this could go live.