Solved

ssh and Linux (RH5.0)

Posted on 1998-04-11
1
331 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.
Suggested Courses

623 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