Solved

ssh and Linux (RH5.0)

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

828 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