No access via SSH after changing the IP address

Hello,

I switch the IP address from 192.168.1.1 to 192.168.2.1 for my router with openWrt.

I can't login via SSH since then (Windows 10/cmd). I find nothing to this problem. :frowning:

C:\Users\Bebbi>ssh root@192.168.2.1
ssh: connect to host 192.168.2.1 port 22: Connection timed out

Regards

Bebbi

Does the PC have the new IP?

ipconfig /renew
ipconfig /all
1 Like

C:\Users\Bebbi> ssh root@192.168.2.1
root@192.168.2.1's password:
Permission denied, please try again.

C:\Users\Bebbi> ipconfig /renew
[...]
IPv4-Adresse . . . . . . . . . . : 192.168.2.160
[...]
C:\Users\Bebbi>ipconfig /all
[...]
Ethernet-Adapter Ethernet:
[...]
IPv4-Adresse . . . . . . . . . . : 192.168.2.160(Bevorzugt)
[...]
Standardgateway . . . . . . . . . : 192.168.2.1
DHCP-Server . . . . . . . . . . . : 192.168.2.1
[...]

Yes, I think.

Did you try again after the renew?
Does Luci work?
Did you try to power it off and then on?

1 Like

Set your PC IP manually to 192.168.2.5. Your DHCP server is not configured for that subnet. When connected fix that

1 Like

Yes. It doesn't change the situation.
Yes, Luci work without problems.
I restarted the rooter. It doesn't solves the problem.

I changed the IP. Either via WLAN nor LAN, the login was possible.

Could you take a screenshot of System-Administration-SSH Access?
Also in System-Startup verify that Dropbear is enabled.
In Status-System Log can you find anything about dropbear?

yes.

I find:

Thu Apr  2 19:18:11 2020 authpriv.info dropbear[1112]: Not backgrounding
Thu Apr  2 19:20:41 2020 authpriv.info dropbear[1918]: Child connection from 192.168.2.160:63526
Thu Apr  2 19:20:48 2020 authpriv.warn dropbear[1918]: Bad password attempt for 'root' from 192.168.2.160:63526
Thu Apr  2 19:20:51 2020 authpriv.info dropbear[1918]: Exit before auth (user 'root', 1 fails): Error reading: Connection reset by peer
Thu Apr  2 19:23:21 2020 authpriv.info dropbear[1919]: Child connection from 192.168.2.160:63578
Thu Apr  2 19:23:31 2020 authpriv.warn dropbear[1919]: Bad password attempt for 'root' from 192.168.2.160:63578
Thu Apr  2 19:28:21 2020 authpriv.info dropbear[1919]: Exit before auth (user 'root', 1 fails): Timeout before auth
Thu Apr  2 22:41:06 2020 authpriv.info dropbear[4306]: Child connection from 192.168.2.5:56252
Thu Apr  2 22:41:14 2020 authpriv.warn dropbear[4306]: Bad password attempt for 'root' from 192.168.2.5:56252
Thu Apr  2 22:41:23 2020 authpriv.info dropbear[4306]: Exit before auth (user 'root', 1 fails): Error reading: Connection reset by peer
Thu Apr  2 22:42:39 2020 authpriv.info dropbear[4323]: Child connection from 192.168.2.5:56384
Thu Apr  2 22:42:50 2020 authpriv.warn dropbear[4323]: Bad password attempt for 'root' from 192.168.2.5:56384
Thu Apr  2 22:42:58 2020 authpriv.warn dropbear[4323]: Bad password attempt for 'root' from 192.168.2.5:56384
Thu Apr  2 22:43:03 2020 authpriv.info dropbear[4323]: Exit before auth (user 'root', 2 fails): Error reading: Connection reset by peer
Thu Apr  2 22:44:33 2020 authpriv.info dropbear[4324]: Child connection from 192.168.2.160:56463
Thu Apr  2 22:44:40 2020 authpriv.warn dropbear[4324]: Bad password attempt for 'root' from 192.168.2.160:56463
Thu Apr  2 22:44:47 2020 authpriv.info dropbear[4324]: Exit before auth (user 'root', 1 fails): Error reading: Connection reset by peer
Thu Apr  2 22:45:17 2020 authpriv.info dropbear[4325]: Child connection from 192.168.2.160:56483
Thu Apr  2 22:45:25 2020 authpriv.warn dropbear[4325]: Bad password attempt for 'root' from 192.168.2.160:56483
Thu Apr  2 22:45:28 2020 authpriv.info dropbear[4325]: Exit before auth (user 'root', 1 fails): Error reading: Connection reset by peer

I use the correct keyboard layout.

I think the error is self explaining.
Go to System-Administration-Routerpasswort and reset your password. Careful with the keyboard layout. Better write the password in a notepad and copy-paste it there to be sure what was typed.

After this, i can't login via SSH.furthermore.

Status-System-Log:

Thu Apr  2 23:28:39 2020 authpriv.info dropbear[12169]: Child connection from 192.168.2.160:58162
Thu Apr  2 23:28:42 2020 authpriv.warn dropbear[12169]: Bad password attempt for 'root' from 192.168.2.160:58162
Thu Apr  2 23:28:46 2020 authpriv.info dropbear[12169]: Exit before auth (user 'root', 1 fails): Error reading: Connection reset by peer
Thu Apr  2 23:28:52 2020 authpriv.info dropbear[12170]: Child connection from 192.168.2.160:58165
Thu Apr  2 23:29:02 2020 authpriv.warn dropbear[12170]: Bad password attempt for 'root' from 192.168.2.160:58165

Just go to System-Backup/Flash Firmware and do a Reset.
Start over the configuration and assign a password.

I set a new IP address. The first time, I try to log in, I get the following question:

ssh root@192.168.3.1
The authenticity of host '192.168.3.1 (192.168.3.1)' can't be established.
RSA key fingerprint is SHA256:ruKe/[...].
Are you sure you want to continue connecting (yes/no)?

Is this ok? If I select no, nothing change and I get the same question the next time. For 192.168.2.1 I selected yes and then the known problems started.

this is normal.

choose yes if you are confident you are connecting to your device.

if the problem persists, try setting a simple password preferably using US ascii keymap.

I have a similiar idea 10 minutes ago and tested passwords without characters that I uses. A password have to be without € für ssh.

Thank you for your support.

Regards

Bebbi

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