Changing SSHD Runlevel on openSUSE 13.1

I am trying to get SSHD to run at runlevel 3, but the wiki is way out of date (no surprise there). It talks about going into YaST and changing the runlevel in there, but the System Services (Runlevels) module it talks about doesn’t exist any longer. Past forum posts are for older versions of SUSE. I tried running “chkconfig --list sshd” after running “chkconfig sshd on --level 35”, but it shows everything as off. My guess is that chkconfig is deprecated because of Systemd? I ran “systemctl start sshd.service” and now it’s starting at runlevel 5, but this isn’t what I want. Being not a complete Linux guru, it seems like chkconfig, systemctl, and xinetd have overlapping functions, and that combined with the non-existent and outdated openSUSE documentation make configuring things difficult. Once I get an answer I’ll update the wiki unless somebody else wants to do it.

I am a bit confused, but that is most probably my fault.

I would think that SSHD would always be started at runlevel 3. But I do not have any pre systemd system to check this. But the way you say that you want it start in runlevel 3 lets me assume that that is not the case by default and that you had to change that always in earlier openSUSE versions. Is that so?

I have always had (and have) SSHD running through xinetd, so again I can not realy compaire with what I have.

You say that now SSHD start at runlevel 5, but you do not show any evidence of it. And btw, whne it sould start at runlevel 3 it of course also starts at runlevel 5. But how do you check to convince the non-believers here that what you say is true? :wink:

I didn’t explain it right after thinking more about it. On the PC I want to connect to, I can only connect after logging into the DE. I am assuming that logging in in runlevel 3 would also allow access to SSHD, but I have not tried that yet. So, I want SSHD to run without any user having to log in, like if the power went out or something like that. I am still confused as to why chkconfig shows that SSHD is not running even though it is.

On 05/24/2014 02:16 PM, pirithous wrote:
> I didn’t explain it right after thinking more about it. On the PC I want
> to connect to, I can only connect after logging into the DE.

Hmm, I am using a vanilla opensuse install and I can connect to my
server from a remote network as long as it is on and the service is
running. Never had any need to log in before the service works. Maybe
you set something in the sshd settings?


openSUSE 13.1 64 bit
KDE 4.13.0
If you found this post helpful, click the star so I can show off my rep
to my friends

This is even more confusing.

If you try to connect, before login to the DE, what happens?

If “sshd” is not running, you would expect “connection refused”. If you get something else, then you have probably misdiagnosed the problem.

Here’s a possible guess: if you are logging in with public key, that requires access to your “$HOME/.ssh” directory. And if you are using an encrypted home directory, then that might not be available until you login.

Okay, that’s only a guess. It at least hints that more information is needed to understand your problem.

For the record, all works fine for me. I install using the DVD, and I setup “sshd” to run on the install page (near the bottom). I can connect remotely before login to the desktop.

On my work desktop, I actually use an “ecryptfs” encrypted home directory. I can still connect remotely before login, but I had to arrange things carefully so that would work.

Like alanbortu I am still a bit confused.

You mean you have a system with openSUSE and you configured the SSHD to run.

Then you try to log in from remote using SSH to it, but it fails. Except when you are loged in already into the openSUSE system through the local GUI login (into the desktop). Is that with the same user as the one that tries to login from remote or does it not matter which one?

I could imagine this happening if you use Network Manager on that system, because then the network starts only on a user logged in in a desktop.

And after reading the other peoples comments, I am afraid that I must add the old rule: do not (only tell your conclusions, but tell what you experience. Give us computer facts and not human guesses.

Thus do not say: the SSHD is not running, but show the output of

ps -ef | grep ssh

or similar.
And to see if the port is listened to (as root):

netstat -tulp | grep ssh

That has to be the problem, I’ll try using ifup and see if that fixes it. Thanks for pointing that out.

You can actually have it work with NetworkManager. Simply define your connection as a “System Connection” with “Auto Connect”. That’s the KDE terminology. In Gnome, I think they call it a shared connection.

It depends all on the functionality of the system. If the system is not for carrying around, but always uses the same LAN (like a desktop or computer room system or a laptop thatonly moves inside the house), there is no need whatsover to use NM.

But the OP never told us much about the system :(.

On 05/24/2014 03:16 PM, pirithous wrote:
>
> hcvv;2645240 Wrote:
>> I could imagine this happening if you use Network Manager on that
>> system, because then the network starts only on a user logged in in a
>> desktop.
>
> That has to be the problem, I’ll try using ifup and see if that fixes
> it. Thanks for pointing that out.
>

I use NM and have never had to worry about that. Seemed to work out of
the box for me (I use key authentication). Only issue I have had with
sshd was port forwarding and firewall rules. If that doesnt fix the
issue post the output that Henk asked for. Good luck, I know how
annoying sshd can be when it doesnt work.


openSUSE 13.1 64 bit
KDE 4.13.0
If you found this post helpful, click the star so I can show off my rep
to my friends

It turned out to be NM, as ifup allows me to connect via SSH without logging into the DE. Everything is working now. As far as the PC, it’s just an old Dell OptiPlex 8300 that I got for free, and I decided to put 13.1 XFCE on it. The previous owner was a chain smoker and it was really nasty inside, and had caked on dust and smoke residue inside and out. I blew it out with an air compressor and was surprised that it actually powered up. I doubt it had ever been dusted out until I did it.

Very good it functions now to satisfaction.

I did not mean that you should go into the dirt inside ;), but we talked about your decision to use NM instead of normal ifup. That depends of course on the goal you use your system for. If it is a carry around one that should connect often to different networks (hotel rooms, home, lobby, airport lounge, etc.) that is a case for MN where the user can decide what to use. When the system is always on the same network (desktop, computer room, laptop but only walked through the house), you do not need NM, so why should you use it to make things difficult annd bother the end-user?