You are not logged in.
Here's one that has been causing me a headache lately. I have a vpnc connection to my employer's network managed with networkmanager. When the connection goes down, it takes sshd with it. Since the VPN connection times out after 24 hours, I often find myself losing my connection in to my laptop at home when I'm at the office.
I've tried configuring sshd to only listen on my home network's LAN address, to no avail. Why does sshd shut down when the vpn tunnel goes down, and where should I look to correct this behavior?
I'd include logs but at the moment I can't get in. heh.
Thanks,
/i.
Offline
My best is that when the vpn comes up your gateway is redirected and all traffic goes through the vpn, then when the vpn goes down it takes all open connections with it.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
That's not a bad idea, and it may be the cause, but I had this same setup (KDE network manager applet, vpnc, sshd) running on Slackware without a hitch. The major difference is systemd, it seems to me. Is there some systemd way I can check that sshd is running and start it if not?
Thanks.
Offline
Check the status with:
systemctl status sshd
Start sshd with:
systemctl start sshd
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Thanks, but I can't do that manually if I can't ssh in. I was wondering if a mechanism existed within systemd to monitor whether certain daemons were running.
Offline
Thanks, but I can't do that manually if I can't ssh in. I was wondering if a mechanism existed within systemd to monitor whether certain daemons were running.
I suspected it would be a catch 22 situation
Looking into the service file of sshd I'd say that if you have sshd enabled and it starts up successfully it will always be running. If for some odd reason it crashes or exits, it should be restarted automatically by systemd.
You can try what ✩ ✩ ✩ says, that is most probably what you are looking for, however if you want to route all traffic through your employers network then you'll have to figure out a middle term solution which might complicate things.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline