SSH Access after image build (password hash)

Hello all,

I am totally burned out. Here is my issue. I have build my own image with the packages and the modules I want.
After configuring the desired IP on the lan and the password for root I am trying to access the router via SSH and the authentication doesn't work at all. This is not blocked by a firewall because I am getting the authentication prompt.

When I am checking the shadow file, the password is hashed with blowfish $2y$13$, which doesn't happen with the default image loaded with the default packages.

So two questions:

  1. Is there a way to change the hashing algorithm when configuring the password with passwd command?
  2. Do I miss something in configuration when I build my own image?

Thank you,

OK here is an update to my issue.

I just removed root's password with "passwd -d root" coomand with serial access. Then I access the router with ssh without having a password and surpisingly I had access.

Then edit /etc/shadow file and manually paste the whole line refers to root credentials. Saved the file and restart dropbear. Boom, it works.

So to my opinion when you configure the password for root the hash is created with blowfish $2a$13$ the ssh access is gone. But when the has is created using MD5 then it works.

Not sure if this is a bug or I miss something on my .config file when I build the image. I just check the default image and the issue doesn't occur. So the weight leans to missing something but have no clue what to check.

At the moment I am building the image again using the default branch .config with my additional packages I need.

Any help to point me somewhere is highly appriciated.

Thank you,

Probably you have changed something related to password generation:

  • you changed busybox options.
  • you included shadow utils or something similar.

Just show your diffconfig output, so we would be to comment your packages & options... So far we have no info.

What does running ./scripts/ give?

Some useful discussions:


Hi Hnyman,

Yes I did also include sthe shadow utility and that was the reason. I recompiled the image without it and the issue was gone.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.