Last active
August 29, 2015 14:06
-
-
Save txdv/906ec79eabc903ef2023 to your computer and use it in GitHub Desktop.
Build script for pam_ssh_agent_auth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# site: https://sites.google.com/site/trevelyansmisc/tech-stuff/sudo-ssh-keyagent-authentication | |
LINK="pam_ssh_agent_auth-0.10.2.tar.bz2 http://downloads.sourceforge.net/project/pamsshagentauth/pam_ssh_agent_auth/v0.10.2/pam_ssh_agent_auth-0.10.2.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpamsshagentauth%2F&ts=1410869486&use_mirror=netcologne" | |
wget -O $LINK | |
tar xvf pam_ssh_agent_auth-0.10.2.tar.bz2 | |
sudo apt-get install -y autotools-dev libssl-dev libpam0g-dev | |
sudo apt-get install -y dpkg-dev debhelper | |
cd pam_ssh_agent_auth-0.10.2 | |
dpkg-buildpackage -us -us -b | |
cd .. | |
sudo dpkg -i pam-ssh-agent-auth_0.10.2-1_*.deb | |
# add this line to /etc/sudoers | |
# Defaults env_keep += "SSH_AUTH_SOCK" | |
echo add this line to /etc/sudoers | |
echo Defaults env_keep += \"SSH_AUTH_SOCK\" | |
read | |
sudo vi /etc/sudoers | |
# add this line to /etc/pam.d/sudo | |
# auth sufficient pam_ssh_agent_auth.so file=/etc/security/authorized_keys | |
echo add this line to /etc/pam.d/sudo | |
echo auth sufficient pam_ssh_agent_auth.so file=/etc/security/authorized_keys | |
read | |
sudo vi /etc/pam.d/sudo | |
echo add public key to /etc/security/authorized_keys | |
sudo vi /etc/security/authorized_keys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment