Solved

ssh and Linux (RH5.0)

Posted on 1998-04-11
1
324 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

747 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

11 Experts available now in Live!

Get 1:1 Help Now