Operating System - HP-UX
1830992 Members
2471 Online
110018 Solutions
New Discussion

Re: using inetd and openssh

 
Keri Franklin
New Member

using inetd and openssh

Is there any way to use inetd to limit acess via openssh?
5 REPLIES 5
ramesh_6
Frequent Advisor

Re: using inetd and openssh

Hi

Yes..absoultely

Add an entry in inetd.conf for sshd similar to the lines of telnet.

ssh stream tcp nowait root /usr/local/bin/sshd sshd

Then anyone connecting to SSH will be going through inetd and sshd will be inetd on demand which will also reduced the overhead on the server. If you dont want to used telnet after enabling sshd via inted disable the same.
Ravi_8
Honored Contributor

Re: using inetd and openssh

Hi,

I don't think ssh will use tcp, if so it's entry should have been in services file.
never give up
Mark Grant
Honored Contributor

Re: using inetd and openssh

Pesonally I think putting things in inetd tends to increase the overhead and slows down response times.

However, you can do this if you want.
Never preceed any demonstration with anything more predictive than "watch this"
Jeff Schussele
Honored Contributor

Re: using inetd and openssh

Hi Keri,

AFAIK ssh can use tcp-wrappers to limit access - specifically the /etc/hosts.deny & /etc/hosts.allow files.
This method does not require inetd.conf or inetd.sec to be used.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Ralph Grothe
Honored Contributor

Re: using inetd and openssh

I'd also agree to Mark's statement that usually the overhead is bigger when a well designed server such as sshd is started through inetd, rather than run as a standalone server (which is the usual way for SSH).
As I understand your motivation for sshd being started by inetd is to have some sort of TCP wrapper.
I think you don't need this since the sshd can take care of this by itself.
Read the manpage of sshd(8), and especially the config file section therein.
Maybe what you want can be achieved through the "AllowUsers" directive in sshd_config
Madness, thy name is system administration