You are not logged in.

#1 2009-09-01 07:57:59

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

[SOLVED] Wicd + SSH

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

#2 2009-09-01 08:47:45

ise
Developer
From: Karlsruhe / Germany
Registered: 2005-10-06
Posts: 404
Website

Re: [SOLVED] Wicd + SSH

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

#3 2009-09-01 09:18:15

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: [SOLVED] Wicd + SSH

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

#4 2009-09-01 09:30:51

zowki
Member
From: Trapped in The Matrix
Registered: 2008-11-27
Posts: 582
Website

Re: [SOLVED] Wicd + SSH

Try putting wicd before sshd on your rc.conf.


How's my programming? Call 1-800-DEV-NULL

Offline

#5 2009-09-01 14:15:28

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: [SOLVED] Wicd + SSH

@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

#6 2009-09-01 20:26:38

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: [SOLVED] Wicd + SSH

@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

#7 2009-09-02 07:17:53

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: [SOLVED] Wicd + SSH

Just wondering: isn't Wicd supposed to connect automatically at boot when wired connection is detected? Because it doesn't...

wicd wrote:

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

#8 2009-09-02 07:31:49

ise
Developer
From: Karlsruhe / Germany
Registered: 2005-10-06
Posts: 404
Website

Re: [SOLVED] Wicd + SSH

brazzmonkey wrote:

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

#9 2009-09-02 08:55:19

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: [SOLVED] Wicd + SSH

ise wrote:

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.

ise wrote:

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

#10 2009-09-02 14:50:26

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [SOLVED] Wicd + SSH

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

Board footer

Powered by FluxBB