SUMMARY: starting ssh/sftp bis

From: Roger Marquis <marquis_at_roble.com>
Date: Sat Feb 11 2006 - 20:10:25 EST
"Pandey, Abhimanyu" wrote:
> basically sshd has nothing to do with inetd...sshd is a stand
> alone process and needs to be started from :

This is not entirely correct. Sshd is a network daemon. It neither
has to be run stand-alone nor from inetd but, like many other
network daemons, can be run either way.

> check is sshd is running. (ps -ef | grep -i ssh) if it's not start
> it as root using /etc/init.d/sshd start

That may be the default in some packages but you are not restricted
to using an rc script. There may be minimal performance penalty
starting sshd from inetd, a few milliseconds on older hardware.
This is usually not noticeable except on many-year-old CPUs or if
the server has to start several connections per second. Otherwise
start sshd in a manner appropriate to the individual server.

Reasons a site may want to start sshd under inetd as opposed to
stand-alone:

   A) other services are already using inetd,

   B) the server uses an inetd with tcp_wrappers or connection rate
   limiting and you don't want to compile these features into sshd as
   well,

   and/or C) to conserve a few Kb of memory when no connections are
   live.

In that case `vi /etc/inetd.conf && pkill -1 inetd` as follows:

   # using an inetd w/ libwrap:
   ssh stream tcp nowait root /usr/sbin/sshd sshd -i

   # or an inetd w/o libwrap:
   ssh stream tcp nowait root /usr/sbin/tcpd /usr/sbin/sshd -i

Then, to keep a clean house:

   ls -l /etc/rc?.d/S*ssh*
   rm /etc/rc?.d/S*ssh*

-- 
Roger Marquis
Roble Systems Consulting
http://www.roble.com/
Received on Sat Feb 11 20:10:26 2006

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:55 EST