Free2Code
 
Time: 2009-01-07, 12:07am
starting mutliple sshd daemons
Subject: starting mutliple sshd daemons  ·  Posted: 2005-01-18, 05:13am
Rank: Unregistered
I'm using a redhat release (9.0), but I think this question is of a general sshd nature.

I'm trying to allow ssh access to my linux server from port 22000 (which comes in from the internet through NAT), and have PermitRootLogin no.

AND also access on the standard port 22 (which is confined by my firewall to local machines only), and have PermitRootLogin yes. Because I'm not expecting root attacks from within my LAN.

The port line of sshd_config allows multiple port numbers, but there is no way of indicating different PermitRootLogin values with each port.

Is there an easy way of doing this short of cloning /etc/init.d/sshd etc. etc.
(which means cloning/linking /usr/bin/sshd because of the way the killproc etc. functions work)?
 
  Reply to this ·  Post link ·  Top
Subject: Re: starting mutliple sshd daemons  ·  Posted: 2005-10-28, 09:25am
Rank: ? (243)
Member #: 194
not really a good idea, if someone gets in through the other port they could attack the root ssh login directly from your machine.

Here's a coupon for a punch to the face.
 
  Reply to this ·  Post link ·  Top
Subject: Re: starting mutliple sshd daemons  ·  Posted: 2006-01-23, 04:48am
Rank: ? (41)
Member #: 25632
Why would you like to login as root anyways? it would be much wiser to use stuff like sudo to perform root-operations, in that way you can also select the root-commands you want to be able to do as regular user.

 
  Reply to this ·  Post link ·  Top

Pages: 1

Please login or register to post a reply.

icons