SSH connection closed

Hi,

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...

(I rebooted router to see, still the same)

did you try ssh root@192.168.1.1 -p ''your port'' ?

Seems like either SSH isn't running or you need to create an SSH key or your ACL isn't permitting access from your IP.

1 Like

You might take a look at the wiki article on SSH access...

I use ssh everyday , all day long.
I don't know why it stopped working today

Here is what I get when using WSL2 on Windows...

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.

1 Like

Yep but it is not my problem.

It seems good advice, I will check .
Thanks

That problem started just after I tried my script with SCP.

Are you blocking port 22 somewhere?

I dont think so, I tried another one and it is the same

not sure if the problem is on my pc or router, or both

What does the script do? Can you stop it?

finaly I reseted the router, now I'm ok.
thanks guys

1 Like

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