Notices


Reply
Thread Tools
Posts: 258 | Thanked: 144 times | Joined on Oct 2009 @ Edinburgh
#11
Originally Posted by z3phyr View Post
sorry i asked this in another thread but no one answered

i want to stop the ssh server to possibly save some power :S
is this particularly battery hungry? as i have installed it. but know i wont use it much

also whats the autostart. is that it restarting on reboot?
 
Posts: 104 | Thanked: 10 times | Joined on Dec 2009
#12
Originally Posted by cgarvie View Post
is this particularly battery hungry? as i have installed it. but know i wont use it much

also whats the autostart. is that it restarting on reboot?

im not too sure if its that battery hungry, havn't really noticed.

but the autostart is it automatically runs again once someone tries to connect to it. for paranoid people that are afraid of unauthorized access
 
Posts: 87 | Thanked: 36 times | Joined on Sep 2009 @ Helsinki
#13
Funnily enough, the server doesn't seem to stop for me, even though it returns "service stopped"; ssh localhost still lets me in.

I suppose I should do some research and file a bug report. Some day...
 
Posts: 32 | Thanked: 9 times | Joined on Nov 2009 @ Norway
#14
Originally Posted by Suurorca View Post
Funnily enough, the server doesn't seem to stop for me, even though it returns "service stopped"; ssh localhost still lets me in.
From an xterminal try :-
Code:
ps -ef | grep sshd
<kill all the processeses>
/etc/init.d/sshd start
/etc/init.d/sshd stop
ps -ef | grep sshd
Does it stop it now - if so it may have been a pid file lying around from earlier. Argh, perhaps it is an interaction between the old and new methods of starting : init.d against upstart. In fact perhaps the above should be just "start sshd; stop sshd" instead of "/etc/init.d/sshd" ?
 
Posts: 258 | Thanked: 144 times | Joined on Oct 2009 @ Edinburgh
#15
Originally Posted by z3phyr View Post
im not too sure if its that battery hungry, havn't really noticed.

but the autostart is it automatically runs again once someone tries to connect to it. for paranoid people that are afraid of unauthorized access

i always thought SSH was fairly secure. did i miss something
 
R-R's Avatar
Posts: 739 | Thanked: 242 times | Joined on Sep 2007 @ Montreal
#16
Originally Posted by Suurorca View Post
Funnily enough, the server doesn't seem to stop for me, even though it returns "service stopped"; ssh localhost still lets me in.

I suppose I should do some research and file a bug report. Some day...
Code:
HHGTTG:/etc/event.d# cat sshd 
start on stopped rcS

console output

respawn

pre-start script
    if [ ! -d /var/run/sshd ] ; then
        mkdir /var/run/sshd
        chmod 755 /var/run/sshd
    fi
end script

exec /usr/sbin/sshd -D
I've got the same problem, if i kill sshd or do ./sshd stop, it doesn't change anything, i can still connect to ssh... Worst case i get booted but the server is still there.

I'm not used to upstart yet, how am i supposed to disable something without edition the main scripts for a hack?
 
Posts: 104 | Thanked: 10 times | Joined on Dec 2009
#17
Originally Posted by R-R View Post

I've got the same problem, if i kill sshd or do ./sshd stop, it doesn't change anything, i can still connect to ssh... Worst case i get booted but the server is still there.

I'm not used to upstart yet, how am i supposed to disable something without edition the main scripts for a hack?

i think you didnt stop the autostart. the server will automatically run again once someone tries to establish a connection to it.

im pretty sure "rm -f /etc/rc2.d/s55ssh" worked for me the first time before i messed up with the ln command.

if that doesnt work then guess you'll have to try that script
 
Posts: 515 | Thanked: 266 times | Joined on Nov 2009 @ Oelsted, Denmark
#18
Originally Posted by z3phyr View Post
last night i was playing with the "update-rc.d -f ssh remove" command. it removed some ssh entries. not too sure what that does, hope it don't cause any problems
You removed the following links:
/etc/rc0.d/K20ssh
/etc/rc1.d/K20ssh
/etc/rc.2.d/S55ssh
/etc/rc.3.d/S55ssh
/etc/rc.4.d/S55ssh
/etc/rc.5.d/S55ssh
/etc/rc6.d/K20ssh

Which meant (K)ill ssh at runlevel 0,1 and 6. (S)tart ssh at runlevel 2, 3, 4 and 5). The 55/20 is the order at which ssh is started/stopped (a start script with S40 will be executed before S41, and the same goes for K scripts)...

Maemo is apparently using runlevel 2 as "GUI" runlevel (normally it's 5), and 0 is shutdown, 6 is restart (don't mind about the rest).

http://en.wikipedia.org/wiki/Runlevel

They can be added again using this:
Code:
update-rc.d ssh start 55 2 3 4 5 . stop 20 0 1 6 .

Originally Posted by z3phyr View Post
where can i learn what the options means like the -f and -d etc.
From the man page of update-rc.d (on Ubuntu):
EXAMPLES
Insert links using the defaults:
update-rc.d foobar defaults
The equivalent dependency header would have start and stop
dependencies on $remote_fs and $syslog, and start in
runlevels 2-5 and stop in runlevels 0, 1 and 6.
Equivalent command using explicit argument sets:
update-rc.d foobar start 20 2 3 4 5 . stop 20 0 1 6 .
More typical command using explicit argument sets:
update-rc.d foobar start 30 2 3 4 5 . stop 70 0 1 6 .
Insert links at default runlevels when B requires A
update-rc.d script_for_A defaults 80 20
update-rc.d script_for_B defaults 90 10
Insert a link to a service that (presumably) will not be needed by any
other daemon
update-rc.d top_level_app defaults 98 02
Insert links for a script that requires services that start/stop at
sequence number 20
update-rc.d script_depends_on_svc20 defaults 21 19
Remove all links for a script (assuming foobar has been deleted
already):
update-rc.d foobar remove
Example of disabling a service:
update-rc.d -f foobar remove
update-rc.d foobar stop 20 2 3 4 5 .
Example of a command for installing a system initialization-and-shut‐
down script:
update-rc.d foobar start 45 S . stop 31 0 6 .
Example of a command for disabling a system initialization-and-shutdown
script:
update-rc.d -f foobar remove
update-rc.d foobar stop 45 S .
__________________
Christian Wilken - tux-POWER.dk!
... May the Source be with You ...

Last edited by DrWilken; 2010-01-03 at 10:37. Reason: edited update-rc.d line (to actually work with ssh instead of "foobar"... :)
 

The Following 2 Users Say Thank You to DrWilken For This Useful Post:
Posts: 152 | Thanked: 41 times | Joined on Dec 2009 @ Sydney
#19
Originally Posted by DrWilken View Post

Maemo is apparently using runlevel 2 as "GUI" runlevel (normally it's 5), and 0 is shutdown, 6 is restart (don't mind about the rest).
It's the Debian way to only use runlevel 2. Red Hat uses runlevel 5 as main runlevel, with varying services starting on the other runlevels.

I don't know why Debian just doesn't use BSD style start up rather than SysV if its only going to use one main runlevel.
 

The Following User Says Thank You to DaveQB For This Useful Post:
Posts: 515 | Thanked: 266 times | Joined on Nov 2009 @ Oelsted, Denmark
#20
Originally Posted by DaveQB View Post
It's the Debian way to only use runlevel 2. Red Hat uses runlevel 5 as main runlevel, with varying services starting on the other runlevels.

I don't know why Debian just doesn't use BSD style start up rather than SysV if its only going to use one main runlevel.
Thanks for educating me...
__________________
Christian Wilken - tux-POWER.dk!
... May the Source be with You ...
 
Reply


 
Forum Jump


All times are GMT. The time now is 18:41.