Author Topic: One word: disable sshd! (erm...)  (Read 4073 times)

bluey

  • Full Member
  • ***
  • Posts: 125
    • View Profile
    • http://
One word: disable sshd! (erm...)
« on: June 07, 2004, 01:42:39 am »
If you don\'t use it, disable it by default and add a desktop icon to enable it, better yet, move it to inetd if you really need it always on.

I noticed a huge boost in performance when sshd is disabled... even on apps using the compat libs, and even on opera, it starts to that sharp page in 4/5 seconds... (opera 6).

Try it.
SL-5500 - OZ 3.5.3
256Mb Kingston SD Card
64Mb PQI CF Card
Netgear MA701 WiFi CF Card
Mandriva GNU/Linux LE2005
Dreaming of a C model...

x86Daddy

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • http://
One word: disable sshd! (erm...)
« Reply #1 on: June 08, 2004, 02:29:05 pm »
Which method did you use to disable?  Remove the link in rc2.d?

bluey

  • Full Member
  • ***
  • Posts: 125
    • View Profile
    • http://
One word: disable sshd! (erm...)
« Reply #2 on: June 08, 2004, 07:53:24 pm »
The ssh init script has a hack to disable it without doing it, the only problem with that hack, is that you can\'t use the init script to start it later... it works by creating a file he tests for and if exists he exits the script...

The best way would be to delete the link, or rename it, so it doesn\'t start with a S, adding a dot \".\" to the beggining should suffice.

I said this, but sometimes things slow down again, other times they\'re ok... I\'ll be testing a bit more to find out what\'s happening.

One thing I think should be changed is the way opie gets started... script which calls script to call the script that call the script which calls the script that... There should be a script which starts opie, so there wasn\'t 2 ou 3 sessions of busybox running (well, maybe one... shared memory and stuff...)... Well, they should know what they\'re doing, I\'m just talking.
SL-5500 - OZ 3.5.3
256Mb Kingston SD Card
64Mb PQI CF Card
Netgear MA701 WiFi CF Card
Mandriva GNU/Linux LE2005
Dreaming of a C model...

bluey

  • Full Member
  • ***
  • Posts: 125
    • View Profile
    • http://
One word: disable sshd! (erm...)
« Reply #3 on: June 08, 2004, 07:56:20 pm »
I noticed a speed up when stopping the ssh daemon, tell me if it works with you, could\'ve been another thing, and my comment turns null, which I\'ll point out if I find it really is another thing...

Maybe this is why there\'s the intention to move to dropbear instead of openssh(d)...
SL-5500 - OZ 3.5.3
256Mb Kingston SD Card
64Mb PQI CF Card
Netgear MA701 WiFi CF Card
Mandriva GNU/Linux LE2005
Dreaming of a C model...

edbarrett

  • Newbie
  • *
  • Posts: 4
    • View Profile
One word: disable sshd! (erm...)
« Reply #4 on: June 25, 2004, 01:34:49 pm »
Quote
The best way would be to delete the link, or rename it, so it doesn't start with a S, adding a dot "." to the beggining should suffice.

The standard way to do this is to change the S to a K, so a

Code: [Select]
# mv S20ssh K20ssh
should suffice.

bluedevils

  • Hero Member
  • *****
  • Posts: 1284
    • View Profile
    • http://
One word: disable sshd! (erm...)
« Reply #5 on: June 25, 2004, 02:01:09 pm »
Each to their own, but the standard I was taught was S to an s.  If it was properly implemented there should be a K representation already there.
I'm now an iphone user and use my zaurii as serial terminals, perl and shell scripting and when I need 640x480 screens

sl-c3100/pda cacko 1.23 | sl-6000l/needs battery | sl-c760/server pdaxrom rc12 | Former sl-5500/tkcrom owner (sister's birthday gift)

bigj

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • http://
One word: disable sshd! (erm...)
« Reply #6 on: June 25, 2004, 03:28:35 pm »
Quote
Each to their own, but the standard I was taught was S to an s.  If it was properly implemented there should be a K representation already there.
Proper implementation is having reboot/shutdown scripts located in either rc.6 (reboot) or rc.0 (shutdown).

bigj

bluedevils

  • Hero Member
  • *****
  • Posts: 1284
    • View Profile
    • http://
One word: disable sshd! (erm...)
« Reply #7 on: June 25, 2004, 03:51:25 pm »
and every rc below the highest operating status.  These are the kill scripts that would bring you down to init 1 from init 3 and so on.......They should not just be in 0 and 6
I'm now an iphone user and use my zaurii as serial terminals, perl and shell scripting and when I need 640x480 screens

sl-c3100/pda cacko 1.23 | sl-6000l/needs battery | sl-c760/server pdaxrom rc12 | Former sl-5500/tkcrom owner (sister's birthday gift)

bluedevils

  • Hero Member
  • *****
  • Posts: 1284
    • View Profile
    • http://
One word: disable sshd! (erm...)
« Reply #8 on: June 25, 2004, 04:00:17 pm »
BTW  sshd on the outdated tkcrom has it in inetd.  I wonder how the cacko and pdaxrom have implemented it.
I'm now an iphone user and use my zaurii as serial terminals, perl and shell scripting and when I need 640x480 screens

sl-c3100/pda cacko 1.23 | sl-6000l/needs battery | sl-c760/server pdaxrom rc12 | Former sl-5500/tkcrom owner (sister's birthday gift)

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
One word: disable sshd! (erm...)
« Reply #9 on: June 25, 2004, 11:33:17 pm »
Adding ssh to inetd.conf is the best option in my opinion, then it only runs when it is needed and for as
long as it is needed.

No more sucking of resources when you Z aint connected to anything (unless you like sshing from the konsole to 127.0.0.1 )

Add the following to inetd.conf
Code: [Select]
#sshd support added below
ssh stream  tcp nowait  root    /usr/sbin/sshd sshd -i -q -f /etc/ssh/sshd_config

You will need to restart inetd and shutdown ssh, but from now on sshd only runs when needed.

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

Pyrates

  • Full Member
  • ***
  • Posts: 198
    • View Profile
    • http://www.pipsfrank.de
One word: disable sshd! (erm...)
« Reply #10 on: June 26, 2004, 06:17:57 am »
Stubear, are you sure this is working? I put that line into my inetd.conf, restartet inetd and killed sshd. But now I can't ssh into my Z, its "ssh: connect to host zaurus port 22: Connection refused". I think I remember trying to run sshd from inetd on my router, but eventually gave up. Can anybody help me here? I don't know how to find out what's wrong... Thanks for any help

Cheers
Philipp
\" ... and the Vogon will do things to you that you wish you\'d never been born, or, if you\'re a clearer minded thinker, that the Vogon had never been born.\"

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
One word: disable sshd! (erm...)
« Reply #11 on: June 26, 2004, 09:24:12 am »
Quote
Stubear, are you sure this is working? I put that line into my inetd.conf, restartet inetd and killed sshd. But now I can't ssh into my Z, its "ssh: connect to host zaurus port 22: Connection refused". I think I remember trying to run sshd from inetd on my router, but eventually gave up. Can anybody help me here? I don't know how to find out what's wrong... Thanks for any help

Cheers
Philipp
Yep, been doing it this way since I got my Z in August last year.

For some reason the first time I installed ssh (and again when I was trying out the Cacko rom) I had to run sshd from the command line as root. Just type "sshd", it should give you the prompt back automatically, from then on it works from inetd.

You may want to check that the paths in the string I gave match the paths to sshd and sshd_config

Stu
« Last Edit: June 26, 2004, 09:25:13 am by Stubear »
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card