ssh and Linux (RH5.0)

Posted on 1998-04-11
Last Modified: 2013-12-15
I downloaded and installed ssh on my Linux box, and the client works fine, but I want to set up the sever, so I can ssh rather than telnet into my machine from the outside, but the instructions were very vague about putting sshd in my rc.local or something, but I don't understand it, and wanted to know if there was anyone that has it running that could tell me exactly what to do.
Question by:anavrin
1 Comment

Accepted Solution

Talence earned 50 total points
ID: 1631553
Well, I can tell you how this has been installed on our system.
Basically, you create a new file called "/etc/init.d/sshd.init"
containing the following (this is just example code):


# sshd          This shell script takes care of starting and stopping sshd.
# marc: Installed sshd in /usr/local/bin

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
if [ ${NETWORKING} = "no" ]
  echo "Networking is down"
  exit 0

if [ ! -f /usr/local/sbin/sshd ]
 echo "sshd binary not found in /usr/local/sbin"
 exit 0fi

# See how we were called.
case "$1" in
        # Start daemons.
        echo -n "Starting sshd: "
        daemon /usr/local/sbin/sshd
        # Stop daemons.
        echo -n "Shutting down sshd: "
        killproc sshd
        echo "done"
        echo "Usage: sshd.init {start|stop}"

exit 0


Then, you create the appropriate symlinks in /etc/rc.d/rc*.d
for the various runlevels (see /etc/inittab for more stuff on
runlevels). If you don't like this, then you can always edit
your rc.local file; you may add something like this:

# Start sshd
echo -n "Starting sshd"

The path depends on where YOU have put your sshd binary.
I think this is more what you want..

Good luck,


Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question