View Single Post
  #3  
Old 03-20-2008, 02:49 PM
unix unix is offline
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default Re: Running multiple sshd instances on one server


>
> I've run two separate sshd daemons. The instructions below,
> which I've posted a few times before, pertain to RedHat-style
> systems (RHEL, Fedora, CentOS, and so on). You'll have to
> translate them for your debian system.
>
> =====
> I suggest the following procedure, which will give you two distinct
> ssh daemons, each with its own policies. These instructions pertain
> to Redhat-style systems, your file paths might vary.
>
> Let's assume you already have ssh set up to listen on one NIC
> with the policies you want. Then, without too much detail:
>
> 1. cp -p /etc/ssh/ssh_config /etc/ssh/otherssh_config
> Modify the new file as necessary for the policy you want.
>
> 2. cp -p /etc/ssh/sshd_config /etc/ssh/othersshd_config
> Modify the new file as necessary. Most importantly, look
> at ListenAddress and Port.
>
> 3. cp -p /etc/rc.d/init.d/sshd /etc/rc.d/init.d/othersshd
> Modify the new file to point to otherssh wherever
> the old file pointed to ssh. This includes
> executables, config files, pid files and key files, for
> example.
>
> 4. cd /usr/sbin/
> ln -s sshd othersshd
> No changes to the executable
>
> 5. cd /etc/pam.d/
> ln -s sshd othersshd
> No changes to the PAM module, usually
>
> Then when all the changes are done:
> 6. chkconfig --add othersshd
> chkconfig --list | grep othersshd
> Should be on in levels 2345
> service othersshd start
> This should create a new set of keys.
>
> One drawback to this scheme: if you ever update ssh, it might change
> the config files or sshd init file, but it won't touch the
> otherssh files.
> =====
>
> --
> Dale Dellutri (lose the Q's)


Thanks. The procedure you gave is about what I thought to do except
I didn't think that is was necessary to copy the executable to another
name first.

Stuart
Reply With Quote