<p>
Thank you to <a href="https://brokeforfree.com/">Broke For Free</a> and for their Creative Commons album <a href="https://freemusicarchive.org/music/Broke_For_Free/Slam_Funk/">Broke For Free: Slam Funk</a>, which was used during this latest show at <a href="https://HackerPublicRadio.org">HackerPublicRadio.org</a>
</p>

<h5>Good sources of information for PAM</h5>
<ul>
<li><a href="https://www.netbsd.org/docs/guide/en/chap-pam.html">https://www.netbsd.org/docs/guide/en/chap-pam.html</a></li>
<li><a href="https://en.wikipedia.org/wiki/Two-factor_authentication">https://en.wikipedia.org/wiki/Two-factor_authentication</a></li>
</ul>

<h5>Overview of PAM Security</h5>
<ul>
<li>Definition: Presenting two or more from something you have, something you know, and something you are.</li>
<li>Centos /etc/pam.d/</li>
<li>Debian /etc/pam.d/ (common-auth exists in Debian and its a system wide security implementation for all pam.d applications)</li>
</ul>

<h5>Google Two Factor Authentication</h5>
<ul>
<li><a href="https://www.mnxsolutions.com/security/two-factor-ssh-with-google-authenticator.html">MNXSolutions.com,Old instructions but still useful</a></li>
<li><a href="https://guides.webbynode.com/articles/security/ubuntu-google-authenticator.html"> Webbynode.com, Useful but still uses outdated mercurial steps</a></li>
<li><a href="https://code.google.com/p/google-authenticator/source/checkout">Google two factor auth git repo source</a></li>
</ul>

<h5>General Instructions</h5>
<ul>
<li>Install git, gcc, and make on your system<br/>
$ apt-get install git make gcc<br/>
$ yum install git make gcc</li>
<br/>
<li>Execute git command as noted on google's site:<br/>
$ git clone https://code.google.com/p/google-authenticator/</li>
<li>Compile and install the google two factor auth PAM module and application<br/>
$ cd google-authenticator/libpam/<br/>
$ make install</li>
<br/>	
<li>Add the following lines to the /etc/pam.d/sshd<br/>
auth     required     pam_google_authenticator.so</li>
<br/>
<li>Location of SSH server configurations<br/>
/etc/ssh/sshd_config</li>
<br/>
<li>Add/modify the following stanza to SSH server configuration:<br/>
ChallengeResponseAuthentication yes</li>
<br/>
<li>Create Google two factor profile for SSH user and answer the setup questions based off your preferences<br/>
$ google-authenticator</li>
<br/>
<li>Restart SSH server<br/>
$ service ssh restart (on CENTOS try $ service sshd restart)</li>
</ul>

<h5>Wrap Up</h5>
<ul>
<li>In Debian based systems you can comment out the system wide common-auth by simply adding a # to the beginning of the @include common-auth.</li>
<li>If you want to use google two auth with other applications simply add it to the appropriate /etc/pam.d/ file</li>
<li>Other useful PAM modules include the Barada module: libpam-barada (OTP with Android Client), pam_winbind (Samba Active Directory authentication module), and many more.</li>
<li>Make sure you have dual SSH connections and are sudo or su as a privileged user. Also make sure any files you configure today are backed up before you edit them. </li>
<li>When setting up Two Factor Auth profiles, go into cleanup mode to ensure you don't use the QR code url where it can be later retrieved from your url history. Also make sure you cleanup your command line and clipboard history so that emergency scratch codes and secret keys can't be found by wondering eyes.</li>
</ul>

<h5>Podcasts worth mentioning.</h5>
<ul>			
<li><a href="https://sixgun.org/">Linux Outlaws</a></li>
<li><a href="https://netsecpodcast.com/">Network Security Podcast</a></li>			
<li><a href="https://risky.biz/">Risky Business Podcast</a></li>
</ul>
<br/>
