Dropbear SSH closing connection when attempting to connect as a non Root User

Arrived here with the same problem.

After a few tests I have no ideea what is the problem but there are the facts:

  • when I create a new user with ‘useradd’ command the same behaviour like topic initiator, Dropbear SSH closing connection when attempting to connect with this new user
    but
  • when I create a new user with ‘adduser’ expected behaviour was happened, I can login through SSH using this new user

Maybe these information can help.

journalctl -u dropbear.service

I made a print screen with above command.



doru - is the user made with ‘useradd -M’ - I can’t SHH login with this user
doru2 - is the user made with ‘adduser’ - I can SHH login with this user

(post edit)

I made another user
doru3 - with ‘adduser --no-create-home’ option and I can’t login through SSH

( chown /dev/pts/0 0 0 failed: Operation not permitted )

‘useradd -M’ and ‘adduser --no-create-home’ make the same things …


Thank you

(later edit)
I found somewhere in a debian documentation what is the difference between these two commands:
‘useradd’ is the oldone
‘adduser’ is the newone based on ‘useradd’ command but build it with perl
Debian documentation ‘strongly recommend’ (maybe not exact words but something like these) to use ‘adduser’ command
instead of ‘useradd’.