Ssh – How to enable ssh access without public/private keys

sshuser-accountsusers

I am building a progressive cyber challenge for my club members (the challenges work), but what I was trying to do to make the progressive part is have each challenge reveal the password for the next account (kind of like the bandit challenge on overthewire.org).

So I am creating 18 accounts on the boxes, each with a different password and the password for user7 is hidden in the home directory of user6 and you have to pass the challenge to get it.

Anyway, everything works locally, but I can't seem to enable password-only ssh for these non-root accounts. There are tons of quides about getting publickey ssh working, but everything seems to treat password ssh like it just works automatically, but it keeps telling me that my password is invalid even though it isn't. Anyone know of a good guide for this?

Ubuntu 18.04

/etc/ssh/sshd_config

# Package generated configuration file
# See the sshd_config(5) manpage for details

# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 1024

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile     %h/.ssh/authorized_keys

# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no

Best Answer

You need to add

PasswordAuthentication yes

to your config file in

/etc/ssh/sshd_config

Once you have that added, you'll need to reload your SSH daemon, using sudo systemctl restart ssh or similar as appropriate for your platform.