Can't access to SSH using PuTTY

is that the output of the /etc/shadow file?

it looks like you're putting in extra quotes..


# cp /etc/shadow "~/shadow"
cp: can't create '~/shadow': No such file or directory

Command failed (Code: 256)

# sed "$ d" "~/shadow" ">" /etc/shadow
sed: ~/shadow: No such file or directory
sed: >: No such file or directory

Command failed (Code: 256)


Seriously, you're messing it up.

Post the output of this:
cat ~/shadow

The Forum is putting quotes here...

ok... sorry.

what is the current result of this:

cat /etc/shadow

Here are the results of all commands:
46%20AM%20001 !
47%20AM !

Don't you think a factory reset wouldn't be the easier course of action at this point?

Custom DNS servers, making dnsmasq hand out external DNS servers as part of the DHCP lease or setting up dDNS are relatively trivial, compared to this kind of debugging.

1 Like

Ok, I would like to troubleshoot the current error for not going over the same steps again.
I would put your conclusion on my mind. Thanks.

+1 to @slh's suggestion.

FWIW, the screen grab clearly shows that the quotes are showing up in the commands you are issuing -- I don't know if this is an artifact of the luci-app-commands environment or if you incorrectly entered it (look at your first screenshot, right before "command failed")

You are right, but there are no quotes as you can see on my previous post.

whatever the case, you need to make sure there are no double quotes. you want single quotes (') around the sed argument, and that is all. Exactly as I had written earlier (I think in comment 31)

Ok, I'm on Opera Browser. Trying this on MS Edge could solve the problem?

I don't know... go ahead and try it. opera, edge, chrome, firefox...

if you can't get the quotes sorted out, this may never work. And it isn't worth much more effort at this point -- you could have done 10 resets and re-configures in the time we've spent here.

Ok, thanks for your time.
Are there any additional steps afterwards?

start from scratch -- reset your router to defaults. try to ssh in. it should work. update the password. try again, it should still work. Setup your DNS and any other basic settings (do not restore). test at every major step -- if it breaks, you'll know what did it.

Then, if you are trying to do more advanced things, read up on them and ask specific questions (in a new thread per major topic) if you are stuck.

Are you trying to run OpenSSH Server (sshd) at the same time as dropbear? You should remove OpenSSH and get Dropbear, which is the default SSH server, to work.

We already did this step, as you can see on my previous posts...
As a quick note:
PuTTY is refusing even to connect to Dropbear after removal of OpenSSH. I remember that was my motivation of getting a connection terminal result anyway.
I would try to remove Dropbear first, then install OpenSSH, to further troubleshoot the situation and possibly mark the Dropbear Service the culprit.

I've got a terminal screen to try a login, but I could not get access again...

Instead of resetting the router, I setup a SSH public key and voila, it worked!!
Now, how can I fix the shadow error?
Thank you...

Edit: Your commands above worked like a charm. there is no shadow entry anymore...