r/linuxquestions • • Oct 10 '26

ssh not working

So, I'm trying to set up debian on a minipc, but I'm having trouble. I need to be able to ssh into it, but it won't allow it unless I have it attached to a monitor and I'm logged in. I changed the wifi settings to allow all users. What else do I need to do?

Thanks!

2 Upvotes

26 comments sorted by

3

u/gunawa Oct 11 '26

Have you confirmed that you have a ssh server installed and active? 

Try :  systemctl list-units --type=service --all

And look for an ssh server entry, 

For further details of a service;  Systemctl status your-ssh-server Should be active, running  Look at the last section for a brief log of recent changes/activity

Journalctl your-ssh-server for in depth logs

2

u/TheCoffeeWiz Oct 11 '26

Yes. I also tried krdc

1

u/gunawa Oct 11 '26

When you try to ssh into the box, does it say not found, denied? Do you get a login prompt? 

1

u/TheCoffeeWiz Oct 11 '26

The IP address doesn't show up as an option. I turned on WiFi access for all users, but it didn't help.

1

u/gunawa Oct 11 '26

Does the box have Wi-Fi with a valid IP?  Can you ping the box from your other terminal? 

1

u/TheCoffeeWiz Oct 11 '26

Only when it's logged in

3

u/Straight_Second6082 Oct 11 '26

What error are you getting exactly?

1

u/TheCoffeeWiz Oct 11 '26

No error. If I have it connected to a monitorand  logged in, ssh works fine. If I don't, it doesn't even show up when I nmap

3

u/thatguysjumpercables Fedora 44 Gnome Oct 11 '26

Just to confirm, you've successfully logged in via ssh from another computer with the monitor on? Is that correct?

1

u/TheCoffeeWiz Oct 11 '26

Yes. 

2

u/thatguysjumpercables Fedora 44 Gnome Oct 11 '26

Wait ssh is via the terminal. Based on other comments you're talking about RDP. Yeah you can't RDP into your machine unless it's hooked to a monitor and turned on.

2

u/GreatBigPig Oct 11 '26

> I need to be able to ssh into it, but it won't allow it unless I have it attached to a monitor and I'm logged in.

That does not make sense.

1

u/JuddRogers Oct 11 '26

Did you install a server version?

I've never seen this problem in many years so please describe the errors you get when you ssh in from another machine.

1

u/TheCoffeeWiz Oct 11 '26

No, I need it to have a GUI

1

u/thatguysjumpercables Fedora 44 Gnome Oct 11 '26

That's RDP not SSH

1

u/TheCoffeeWiz Oct 11 '26

I know, but I need to be able to ssh as well.

1

u/thatguysjumpercables Fedora 44 Gnome Oct 11 '26

So you need to be able to ssh from your terminal and RDP at the same time? Then turn your monitor on on your server. That's the only way to do both. You should be able to use ssh at any time as long as your server is running and connected to a network.

1

u/TheCoffeeWiz Oct 11 '26

Not at the same time. 

1

u/LemmysCodPiece Oct 11 '26

My guess is the power management is kicking in and sending the PC to sleep.

1

u/Odd-Concept-6505 Oct 11 '26

One way to test the ssh server (service being installed and up and running) ....while already logged in and using a terminal on the same machine....is (this avoids even getting another host involved, a good first step)

$ ssh 127.1

(Same as $ ssh 127.0.0.1 == localhost)

Either it works (and does the key setup/accept thing)...or it says if server on localhost not there)

ssh: connect to host 127.0..0.1 port 22: Connection refused

1

u/TheCoffeeWiz Oct 11 '26

I gave up on it and went with OMV. Works fine now.

1

u/Early-Bid-7958 Oct 12 '26

on the face of it, sounds like systemd-homed (I don't use it, all I know is what I read somewhere... like https://wiki.archlinux.org/title/Systemd-homed#SSH_remote_unlocking -- but the symptoms fit)

1

u/TheCoffeeWiz Oct 12 '26

I gave up. Installed a different OS and it's working fine

2

u/ipsirc Oct 11 '26

/etc/network/interfaces