2

For the purpose of a training session, I'd like to make it possible for a particular user to connect without requiring a password or key-based authentication. I do not know the IPs or other data of the people connecting up front.

Is it possible to configure OpenSSH's sshd (or PAM) in a way to make this possible? How?

NB: The access will be time-limited and the access on the system will also be rather limited, so there is no need to point out security implications.

  • 1
    Well, start by training the user to enter a password for a secure session :-) – Lambert May 19 '15 at 12:17
  • @Lambert: I'm afraid my curiosity forbids me to dodge my own question so easily. Also, there will be a password prompt as well, but that will be after the point I'm asking about, so my question stands ;) – 0xC0000022L May 19 '15 at 12:21
  • Sure, I was just joking... Did you had a look at the PermitEmptyPasswords directive in sshd_config? Would that option be sufficient? – Lambert May 19 '15 at 12:42
  • @Lambert: preferably I'd like to circumvent the prompt for the password altogether. To my knowledge PermitEmptyPasswords merely allows hitting <kbd>Enter</kbd> when the password prompt appears. But I'll check it out again. Haven't used it in years as it's normally not desirable. – 0xC0000022L May 19 '15 at 12:53
1

On Solaris 11 you can use:

vi /etc/ssh/sshd_config
PermitEmptyPasswords yes

Reload sshd

Add a new user

useradd -m -d /home/testuser -s /bin/bash testuser
passwd -d testuser

SSH using new user

admin@testhost:~$ ssh testuser@localhost
Last login: Tue May 19 15:02:42 2015 from localhost
Oracle Corporation      SunOS 5.11      11.2    December 2014
testuser@testhost:~$

On Linux you may need to change the UsePAM directive to no in `/etc/ssh/sshd_config

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.