- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- secsh - how to edit to manage multiple sshd daemon...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2010 07:42 AM
03-09-2010 07:42 AM
I have set up a secondary sshd daemon to run on a separate port. My question is this...how can I edit the secsh script to successful stop and start all instances of my sshd daemons at bootup/shutdown? Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2010 07:51 AM
03-09-2010 07:51 AM
Re: secsh - how to edit to manage multiple sshd daemons
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2010 08:05 AM
03-09-2010 08:05 AM
Re: secsh - how to edit to manage multiple sshd daemons
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2010 08:25 AM
03-09-2010 08:25 AM
Re: secsh - how to edit to manage multiple sshd daemons
If you configure the sshd_config and the ssh_config files as instructed to run multiple daemons, the start/stop for secure shell will handle this for you.
Make the changes:
/sbin/init.d/secsh stop
/sbin/init.d/secsh start
Do some testing to make sure the configuration changes work.
Running openssh/secure shell on more than one port is a PITA and I'd have solid reasons for doing so.
SEP
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2010 08:26 AM
03-09-2010 08:26 AM
Re: secsh - how to edit to manage multiple sshd daemons
It calls the daemon with an alternate config file but care must be taken as the original secsh script kills anything that is named "/opt/ssh/sbin/sshd" when you ask it to stop; hence it kills both your daemons at once which is not desirable. So I hardlinked /opt/ssh/sbin/sshd to /opt/ssh/sbin/224sshd and start it with the link instead in my script so that it doesn't get killed.
Olivier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2010 08:33 AM
03-09-2010 08:33 AM
Solution/sbin/rc2.d/S394secsh (linked to /sbin/init.d/secsh2)
/sbin/rc1.d/K605secsh (linked to /sbin/init.d/secsh2)
/sbin/init.d/secsh2
/etc/rc.config.d/sshd2
In /etc/rc.config.d/sshd2 ensure that you add options in SSHD_ARGS to use a different config file and port.
In /sbin/init.d/secsh2 you must change the WHAT, and WHAT_CONFIG values to point to the alternate files.
The WHAT_PID is a problem. You need to specify a different PID path for the second daemon in the config file and add it here.
Also in the start section you have to add a "-w" in the grep for the evaluation of the "NOT_RUNNING" variable because the grep will capture both sshd processes.
grep -w "/opt/ssh/sbin/sshd"
grep "/opt/ssh/sbin/sshd -p XX" where XX is the port number of the second daemon.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2010 01:47 PM
03-09-2010 01:47 PM