Solved

ssh and Linux (RH5.0)

Posted on 1998-04-11
1
325 Views
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.
0
Comment
Question by:anavrin
1 Comment
 
LVL 1

Accepted Solution

by:
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):

-------

#!/bin/sh
#
# 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" ]
then
  echo "Networking is down"
  exit 0
fi

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

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

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"
/usr/local/sbin/sshd

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

Good luck,

Talence
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

912 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now