OpenWrt 19.07.5 ssh-login as root

Yes, I use the # and * and ! .

Welcome to Linux. I don't advise use of Exclamation Marks in Linux - except where scripting, commands and programs state.

3 Likes

From long, bitter experience of having to juggle US and UK keyboard layouts at work, I've made the choice to avoid certain characters in my passwords. # is one of those characters I no longer use. I'm not going to tell you that character is definitely the cause of your problem (it sounds like there might be other stuff going on) but if there's any chance there might be some character translation going on then it might be an explanation of it.

2 Likes

As a quick test, I spun up an x64 VM for OpenWRT 19.07.5, to see what it might do.

As expected, I got the usual "You don't have a password set" warning when I first signed in. So I set a password on the admin web page, and then went about trying to connect via SSH.

Here's the SSH configuration:

Here's what I see if I try to connect via SSH:

And after I type the password...

Then I saved an SSH public key in the GUI:

And now I don't get a password prompt; I sign straight in thanks to the SSH key agent running in the background:

1 Like

And what about + and , and - ?

Well, yes, this is because the key is saved [in PuTTY].

A Linux command may look like:

ssh -i /home/fanifeey/Documents/fanifeey_key/foo.key root@192.168.1.1

  • What about your key that's not working?
  • Also:
2 Likes

I'm aware; I was offering it as an illustration for what the OP might broadly expect to see if the public key had in fact been saved correctly in the GUI (which would have populated /etc/dropbear/authorized_keys behind the scenes). The point being, even if the OP's password is encountering suspected keyboard translation issues, public key auth ought to still work and provide a way into the command line.

2 Likes

:+1:

I agree!

1 Like

It cannot be because of the special characters or the password length.
I have now tried a short password for the rehearsal and without special characters.
The result: the password for root is not accepted. under ssh.

I have also disabled password login and root with password under Administration/ssh.
The entered key is not used.
Under freeNAS in jail I did not have such problems. That is to say, I have been very busy with ssh.

yes I'am sure

1 Like

In case it wasn't obvious, my sharing of screenshots was a subtle hint to do the same. Too subtle, perhaps.

The old adage "a picture paints a thousand words" is a cliché for a reason: it's true.

If you can show us what you see, to support your explaining what you believe to be happening, that may help us to offer advice which may assist you in your endeavours.

Ultimately, something might be badly broken to the point where you might not be able to fix it with the GUI. There might not be an easy solution. If that's the case, @lleachii's earlier observation about having to reset to defaults should be borne in mind.

2 Likes

ummm...???

:confused:

Let me provide a pic too:

screen100

:warning: You need to set this to use password and key.

:+1:

1 Like

~]$ ssh root@192.168.0.1
root@192.168.0.1's password:
Permission denied, please try again.
root@192.168.0.1's password:

1 Like

You changed the router IP to 192.168.0.1?

1 Like

Now I've got a really daft question for you, but I'm gonna ask it anyway: is 192.168.0.1 the IP address of your OpenWRT instance? The default IP address is 192.168.1.1; have you changed it?

1 Like

SSH Access

Dropbear offers SSH network shell access and an integrated SCP server

Dropbear Instance

Interface

  • unspecified

Listen only on the given interface or, if unspecified, on all

Port 22

Password authentication yes

Allow SSH password authentication

Allow root logins with password yes

Allow the root user to login with password

Gateway Ports open

Allow remote hosts to connect to local SSH forwarded ports

By screenshots I meant literally that: images, rather than text.

This may help: https://www.google.com/search?client=firefox-b-d&q=Linux+equivalent+of+snipping+tool

Yes, I changed the standard IP from 192.168.1.1 to 192.168.0.1 and under this IP (192.168.0.1) I also reach the web interface.

1 Like

Thank you so far here!
I'm k.o.
I'm quitting for today.
Greeting

And now I've got another really daft question for you: is the OpenWRT router the only device on your network with that IP address, or is there another device which also has the IP address of 192.168.0.1?

3 Likes