Peter Lyons asked:
I’d like to set up a user on my system (Ubuntu 14.04 x64) such that people can run
ssh [email protected] and see some output from a program without being prompted for a password or having to have an ssh key. Here’s what I have done so far:
- created the
exampleuser with my program as it’s shell via
adduser example --shell /path/to/my/program
- created an empty file at
/home/example/.hushloginto quiet the motd and other login messages
Things are working with the exception that I must complete the password prompt authentication challenge, which I’d like to bypass as this will be a publicly-available service.
Presumably customizing the PAM configuration under
/etc/pam.d appropriately might do the trick but I need some guidance on the specifics. I want this change to only affect this specific user account, not every account on the system.
PermitEmptyPasswords yes in
/etc/ssh/sshd_config, and then make sure the user account has no password.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.