Docker SSH set password not working

First run passwd  command to change the password, after inputting new password, following output is shown.

passwd: password updated successfully

I bind docker port 22 to host port 33333, then running following command to connect to it using ssh with the new password we set earlier

After inputing password, following error is appeared

Permission denied, please try again.

SSH logs from /var/log/auth.log

Solution

To fix this issue, change /etc/ssh/sshd_config

to

Restart sshd and connect to it again, it should work now.