really don't know what is going on, but I got that;
~$ ssh root@192.168.1.1
Connection to 192.168.1.1 closed.
I tried some things that I've read here but nothing works. It wa working this morning, what I'v done today is that installed logread /syslog on mylinux pc to use logread. After tht I started a script to scp to router just after I've started logread -f and now ssh does not work...
jim@Jim-PC:~$ ssh root@192.168.1.1
The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.
ED25519 key fingerprint is SHA256:YtsLZyplQ7eghSr9lygepNrPqX59qmRJ+u9V+ksPK+I.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.1.1' (ED25519) to the list of known hosts.
root@192.168.1.1's password:
BusyBox v1.33.1 (2021-10-24 09:01:35 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 21.02.1, r16325-88151b8303
-----------------------------------------------------
root@OpenWrt:~#
Make sure there is only one device on your network at that IP address, or of course strange things will happen.
If your script is repeatedly running scp so that multiple sessions remain open, the router will run out of memory and the next attempt at ssh would die.
Modifying /etc/password or /etc/shells so that the root user does not have a valid shell might cause this. Although I think that dropbear refuses to allow login at all in that case.