Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 2438

General discussion • Re: rPi is responding suddenly with (ssh) connection refused

$
0
0
How can I enable ssh on the pi from my linux box without connecting a monitor/keyboard to the pi?
I'm assuming you didn't change the SSH port number, which some people do in the name of security (security through obscurity is not security, so it's really not something I'd recommend).

First, I would try just rebooting it, which you'll have to do by just pulling power (not normally recommended, but it's all you can do if you have no way in). It's possible that the SSH daemon has died or something like that, if nothing has changed and it has just suddenly stopped working.

After that, if it's still refusing connections, you need to somehow get into the system to find out what's going on with the SSH daemon. Your options are a serial console, keyboard & monitor, or VNC (if desktop & VNC are enabled). There's no magic way to reset or fix SSH from outside if it's refusing connections.

The last option is to pull the microSD card (power off first), and mount it on another system to see what's going on. A quick way to enable SSH (on Raspios Bookworm, and I think earlier versions, but I don't have any obsolete installs to quickly verify), if it's simply a case of the service isn't enabled, is to create either a file named "ssh" or "ssh.txt" in the FAT32 boot filesystem; there should be a default sshswitch.service on standard Raspios installs which will enable and start the SSH service and delete that file (i.e. if the file vanishes following a boot attempt, it's probable that sshswitch.service ran and tried to enable and start the SSH daemon).

Statistics: Posted by Murph9000 — Wed Oct 23, 2024 1:42 am



Viewing all articles
Browse latest Browse all 2438

Trending Articles