Is it possible to use MYSQL to store user accounts and use it to authenticate with your SSH (OpenSSH/Dropbear) and is it possible to use remote mysql database?
Basically, I want to use MYSQL as user database and use it to authenticate w/ expiration and if possible I want to use remote mysql database.
Answer
In addition the the AuthorizedKeysCommand
recommended by @praveen-p (highly recommended), you could use PAM-MySQL for a service (and UsePAM=1
in sshd_config). There are better user account mechanisms and using those over MySQL is recommended.
Attribution
Source : Link , Question Author : James Roi Dela Cruz , Answer Author : danblack