Does anyone know how to do this?

    I do...to an extent.
    Though in most cases it's un-needed, since you can just add the startup command in rc.local

      Hiya... Im a mate of piersk and he was asking the question on my behalf...

      Ive done a new install of redhat9 as a server, with the intention of running a web and mail server... I want to run an SSH server so I can login without having to disappear nextdoor.

      Once I am logged in I can run the SSH server with >sshd and then log in remotly all OK... What I would like is for sshd to run automatically when i turn on the machine, (just like the http server does).

      Ive looked on the net and got a script which I have put in (http://www.fr.linuxfromscratch.org/view/blfs-1.0/server/openssh.html) but it is giving me all sorts of problems.. (the directory it is looking for the source in doesnt exist, amongst other problems)

      Is there anyone out there that understands what all the sript stuff is all about.

      Cheers

      Soundie

        Yeah, I thought piersk ran Debian 🙂

        Redhat has a built in sshd. Why aren't you using that?

          Sorry... not being too clear here...

          I am using the built in sshd... Im just trying to get it started automatically, I just linked to that page to show the script that I used in the /etc/rc.d/init.d/ directory.

          I dont have an xserver either due to lack of ram in the machine..

            No problem. At the command line, type "setup". This takes you into redhat's setup utility. Go to "system services", tab down and select sshd. This will invoke redhat's sshd rc.d script, and will automatically start the sshd at system startup

              Yeah... I had tried that... but ssh doesnt seem to be there... Under S i have...

              saslauthd
              sendmail
              servers
              services
              sgi_fam
              smb
              squid
              syslog

              Nothing else looks like SSH

                You must not have installed it. Do this and let me know what you get back:
                rpm -qa|grep ssh

                My output looked like this:
                [root@uwbux0001 init.d]# rpm -qa|grep ssh
                openssh-askpass-gnome-3.6.1p2-19
                openssh-3.6.1p2-19
                openssh-server-3.6.1p2-19
                openssh-clients-3.6.1p2-19
                openssh-askpass-3.6.1p2-19

                  I can get it to run, but only by going nextdoor and typing >sshd to get it running every time i restart... and it works just fine...

                  rpm -qa|grep ssh gives me

                  openssh-3.5p1-6
                  openssh-server-3.5p1-6
                  openssh-clients-3.5.1-6

                    Well, we can try two different things.
                    1) You can try adding the command to your /etc/rc.d/rc.local file. It runs the commands in that file at startup, after all of the other init scripts have run.

                    2) I can give you my rc.d file for that. Don't know if this would work, might need a little changing because it's a different version and different OS.

                    Try the first one, if that doesn't work, we can fenagle a good rc.d file for you.

                      Sorry, im being a dolt.... Which command do I want to put in?

                      just sshd or the whole of the script as in my link...

                        Whatever command you use to start sshd. Though, you'll want to specify the full path, which for me is /usr/sbin/sshd

                          cool.... i tried just putting sshd into the file and it works just fine...

                          thanks a lot

                            No problem. Like I said, for most startup commands that don't need a whole lot of options, you can usually just use rc.local. Comes in pretty handy 🙂

                              Write a Reply...