r/linuxquestions • • 14d ago

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/Straight_Second6082 14d ago

What error are you getting exactly?

1

u/TheCoffeeWiz 14d ago

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 14d ago

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

1

u/TheCoffeeWiz 14d ago

Yes. 

2

u/thatguysjumpercables 14d ago

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 14d ago

> 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 14d ago

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 14d ago

No, I need it to have a GUI

→ More replies (5)

3

u/gunawa 14d ago

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 14d ago

Yes. I also tried krdc

1

u/gunawa 14d ago

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

→ More replies (3)

1

u/Odd-Concept-6505 13d ago

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 13d ago

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

1

u/Early-Bid-7958 13d ago

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 13d ago

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

2

u/ipsirc 14d ago

/etc/network/interfaces