You are not logged in.
Pages: 1
Hi there,
I've got a laptop running Wicd to manage my network connections.
SSH, which is in the daemon array of my rc.conf, tries to start on boot, but fails because no network is available at this time.
Is there a way to start SSH daemon when a network connection is active, and stop it when network is disabled ?
Thanks in advance.
Last edited by brazzmonkey (2009-10-14 12:59:47)
what goes up must come down
Offline
I can't proof it right now (not at a linux box), but I remember that wicd can execute external scripts. The feature list on the webpage lists: "Ability to run scripts before/after connecting/disconnecting"
I don't know which rights it have, but maybe you can try to start ssh with that feature. But it is also possible that wicd doesn't have enough rights to start/stop daemons.
Daniel
Last edited by ise (2009-09-01 08:48:30)
Offline
I believe the scripts are started with wicd-client, which has user rights only.
If you're running a SSH daemon, shouldn't your network connections be relatively static? WICD is only really useful if you're on a laptop which has different networks to connect to all the time, and somehow I doubt you'd run a SSH server on one of them.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Try putting wicd before sshd on your rc.conf.
How's my programming? Call 1-800-DEV-NULL
Offline
@ise
I thought about that at first, but there's a problem with permissions, hence this thread.
@ngoonee
I happen to use SSH when my laptop's at home, for remote maintenance tasks (when somebody's using the laptop).
@zowki
Sounds like a good idea to me. I should have thought about it myself...
what goes up must come down
Offline
@zowki
It doesn't seem to work... Maybe because Wicd only enables connection when I log into a desktop session ?
I configured Wicd connection's scripts to start/stop ssh upon connection/disconnection. That should do it for now.
Thanks guys.
what goes up must come down
Offline
Just wondering: isn't Wicd supposed to connect automatically at boot when wired connection is detected? Because it doesn't...
Automatically connect at boot - no user intervention required, even for encrypted networks
In my case it only connects when wicd client is active.
what goes up must come down
Offline
Just wondering: isn't Wicd supposed to connect automatically at boot when wired connection is detected? Because it doesn't...
If you have set the option that wicd should connect to wired network if detected then it should do automatically. Worked here without problems. wicd connects to wired network if detected, otherwise it tries to connect to wireless network. You must set also the option "Automatically connect to this network" at the wired network connection.
You said also you have set up wicd to start/stop sshd, how exactly have you done it, because I have suggested it in my first post.
Offline
If you have set the option that wicd should connect to wired network if detected then it should do automatically. Worked here without problems. wicd connects to wired network if detected, otherwise it tries to connect to wireless network. You must set also the option "Automatically connect to this network" at the wired network connection.
I have to check (I'm at work right now), but I think this is properly configured, so I don't understand why it only connects when my desktop session is started.
You said also you have set up wicd to start/stop sshd, how exactly have you done it, because I have suggested it in my first post.
I went to the "scripts" feature of my wired connection, I was prompted for root password and I set up:
- "/etc/rc.d/sshd start" as post-connection script
- "/etc/rc.d/sshd stop" as post-disconnection script
what goes up must come down
Offline
The scripts doesn't work here...
I open wicd-client, click on properties, scripts. It asks for my password and then it opens a window where I can type the scripts I want to run. I type them down, but when I reopen the scripts window, there's nothing there.
(lambda ())
Offline
Pages: 1