Quick guide how to set up Rstudio Server Open Source Edition with Google Auth instead Linux PAM.
-
Download and install rstudio on your machine. Nice guide for Ubuntu/Debian based servers.
-
Install Google Authenticator PAM module. It’s available on most linux distros. For Ubuntu 20.04 issue command in your terminal.
sudo apt install libpam-google-authenticator
-
Configure PAM module.
sudo cp /etc/pam.d/login /etc/pam.d/rstudio
-
Comment out line 57 in newly created /etc/pam.d/rstudio file.
# Standard Un*x authentication. #@include common-auth
-
Generate authentication code for linux user. Guide on ArchWiki.
-
Install authentication application on your device.
-
android andOTP.
-
iOS 2FA Authenticator.
-
This procedure replace PAM authentication for Rstuidio with OTP (One Time Passwords). Use your linux user name and OTP generated in your app.
I hope this post will be usefull and login for your Rstudio Server more secure.