Hi,
any idea why I cannot login via SSH to my 23.7 version anymore? I am using Putty, terminal window opens, asks for login, I enter my username, then prompts for password, and as soon as I enter password, Putty terminal window closes. I can Putty to all other servers and devices, so I guess Putty is OK.
Logs in OPNSense web consile show like I am logged in, but I am not:
2023-09-26T18:12:11 Critical nologin Attempted login by myusername on /dev/pts/0
2023-09-26T18:12:11 Informational sshd Accepted keyboard-interactive/pam for myusername from 123.212.63.25 port 52121 ssh2
2023-09-26T18:12:11 Notice audit user myusername authenticated successfully for sshd [using OPNsense\Auth\Services\System + OPNsense\Auth\Local]
Lol...solution:
somwhow under my username I've had login shell set to /sbin/nologin, which is a polite refusal of login. Changed this to /bin/sh and I am in. :)
https://forum.opnsense.org/index.php?topic=35415.0 (https://forum.opnsense.org/index.php?topic=35415.0)
I've tried using nano vim and usermod to add a shell back to my account via root. How did you add a shell to yours?
Quote from: Plcstenberg on September 11, 2024, 01:31:21 PM
I've tried using nano vim and usermod to add a shell back to my account via root. How did you add a shell to yours?
Use the UI.
Quote from: Patrick M. Hausen on September 11, 2024, 02:20:49 PM
Quote from: Plcstenberg on September 11, 2024, 01:31:21 PM
I've tried using nano vim and usermod to add a shell back to my account via root. How did you add a shell to yours?
Use the UI.
thank you. this helped fixed my issue
As of recently I too cannot login via SSH any longer. It started after the last two Opnsense updates.
I tried two different accounts that previously worked and are members of the admin group.
How do I fix this?
2024-12-03T17:54:46-05:00 Error sshd-session error: PAM: Authentication error for illegal user xxx from 192.168.100.xx
2024-12-03T17:54:46-05:00 Warning audit user lee could not authenticate for sshd. [using OPNsense\Auth\Services\System + OPNsense\Auth\Local]
2024-12-03T17:54:15-05:00 Critical nologin Attempted login by xxxxx on /dev/pts/0
2024-12-03T17:48:10-05:00 Critical nologin Attempted login by xxxx on /dev/pts/0
2024-12-03T17:46:17-05:00 Error sshd-session error: PAM: Authentication error for root from 192.168.100.xx
2024-12-03T17:46:17-05:00 Warning audit user root could not authenticate for sshd. [using OPNsense\Auth\Services\System + OPNsense\Auth\Local]
Using the UI, can you check that the user has an adequate shell assigned ie. not /sbin/nologin ?