Re: Two independent SSHD processes?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/20/2015 04:20 PM, CLOSE Dave wrote:
I'd like to run two SSH daemons on the same machine. They will listen on
different ports and have other differences in their configuration. I
want these two daemons to be independent of each other: either can run
while the other is stopped. I need to do this for recent (systemd)
machines and for older ones (SysV).

I'm finding that, although the SSH daemon records its PID in a file,
that file is not configurable. Consequently, it seems that stopping one
of the daemons causes the other to also stop. Same for starting one.

Here is the procedure I'm using to setup the second daemon on SysV. (The
first one is the standard daemon normally running. I haven't tried yet
on systemd.)

cd /usr/sbin; ln -s sshd xsshd
cd /etc/pam.d; ln -s sshd xsshd
cp /etc/rc.d/init.d/sshd /etc/rc.d/init.d/xsshd
# edit /etc/rc.d/init.d/xsshd to reference a different config file
# and the new program name, xsshd
chkconfig --add xsshd

I realize that I might be able to workaround these difficulties, or some
of them, by revising the standard system control files. I'd like to
avoid doing that and just fit within the Fedora framework. Is that
likely to be possible?

You need two /etc/sshd/sshd_config* files, one for each sshd server process. You can specify the PID file using the directive:

	PidFile /path/to/desired/PID/file

in the appropriate config file. You'll need to start the sshd processes
by specifying which config file you want, e.g:

	sshd -f /etc/sshd/sshd_config-1
	sshd -f /etc/sshd/sshd_config-2

----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks@xxxxxxxxxxxxxx -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-           What is a "free" gift?  Aren't all gifts free?           -
----------------------------------------------------------------------
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux