LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-14-2024, 10:16 PM   #1
foa771
LQ Newbie
 
Registered: Mar 2024
Posts: 2

Rep: Reputation: 0
can't ssh into amazon linux using domain auth + OTP through (Radius+LINOTP)


I am trying to configure MFA on an a domain joined amazon Linux instance through Radius to LinOTP.
I have managed AD, Radius and LinOTP configured and working properly

I followed this documentation to configure the LinOTP and Radius:
https://aws.amazon.com/blogs/desktop...on-workspaces/

I used this to join linux instance to domain:
https://docs.aws.amazon.com/director..._instance.html

On the linux instance i downloaded PAM_Radius
https://github.com/FreeRADIUS/pam_radius

Here are the configuration on the linux:
I added the details of the radius server in the /etc/pam_radius.conf file
The content of the etc/pam.d/sshd file is attached
The highlight of the /etc/ssh/sshd_config is:
- passwordauthentication yes
- challengeresponseauthentication yes
- usepam yes


My problem is when I SSH to the Linux instance, It asks for a password. After I enter my domain password, It asks for the OTP Token and then it goes back to asking for password and so on.

sign in method 1: (FQDN)
I ssh to the instance using:
ssh username@domain.com @<public Ip address>

Here is what I see in logs:
- Linux instance: /var/log/secure- authentication success
- LinOTP: username not found in realm
- When I look at the radius logs, it seems that the OTP password is not correct since the field user-password would be random characters.

sign in method 2: (without FQDN)
I ssh to the instance using:
ssh username@<public Ip address>

Here is what I see in logs:
- Linux instance: /var/log/secure- invalid user username
- LinOTP: found username
- When I look at the radius logs, it seems that the OTP password is not correct since the field user-password would be random characters.


I need some guidance on how to configure this amazon linux instance using domain credientials to authenticate to managed AD then use OTP(through radius and LinOTP) to do MFA. I appreciate your guidance
 
Old 03-16-2024, 02:29 PM   #2
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
What is the pam file sshd? I don't see it included. You should use radtest to verify that it auths before you do anything. Then you can look at why it doesn't on your system. There is a debug option in pam that spits out everything, but most problems are due to sufficient/requisite/required and how pam passes the password through the modules.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SSH-key + RADIUS-PAM auth without 2 instances of sshd? Strykar Debian 1 08-16-2016 02:53 PM
Free-radius with sms-otp teslashelby Linux - Newbie 1 12-08-2015 06:42 AM
Configure Red Hat Linux as Radius client and Windows NPS server as radius server balaji2219@gmail.com Linux - Newbie 2 06-29-2015 08:21 AM
Radius Server with Mobile OTP nishith Linux - Software 1 01-02-2015 12:37 PM
PAM help (multi-factor SSH auth using RADIUS and LDAP) jg141 Linux - Security 0 04-17-2012 12:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration