Bug 93228 - security/openssh-portable: rc.d script is useless for remote systems
Summary: security/openssh-portable: rc.d script is useless for remote systems
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Marcus Alves Grando
Depends on:
Reported: 2006-02-12 10:00 UTC by Oliver Lehmann
Modified: 2006-02-21 19:45 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Lehmann freebsd_committer 2006-02-12 10:00:14 UTC
	using openssh.sh to stop the sshd for starting it after (or using 'restart')
	ends up in having openssh.sh killing _all_ the sshd processes, not just
	the server. that ends up in loosing my ssh connection which is pretty
	bad when the ssh server is not running because it was shutted down....
	even killing the server by hand and using openssh.sh to start fails.

	root@asassas openssh-portable> ps auxww | grep ssh
	root     71249  0.0  0.3  5384  2040  ??  Is   12:02AM   0:00.06 sshd: assasa [priv] (sshd)
	assasa   71254  0.0  0.3  5384  2076  ??  S    12:02AM   0:01.67 sshd: assasa@ttyp2 (sshd)
	root     86211  0.0  0.2  2772  1888  ??  Is   Fri10AM   0:00.35 /usr/local/sbin/sshd
	root@asassas openssh-portable> kill 86211
	root@asassas openssh-portable> /usr/local/etc/rc.d/openssh.sh start
	openssh already running? (pid=71249 71254).
	root@asassas openssh-portable> /usr/local/etc/rc.d/openssh.sh forcestart
	openssh already running? (pid=71249 71254).
	root@asassas openssh-portable>

	I used "nohup /usr/local/etc/rc.d/openssh.sh restart >&/dev/null &" but I
	feel bad. Think about an error with openssh which prevents it from working
	correctly. Since I lost my ssh session I can't fix it.... that is _bad_ :(
Comment 1 Edwin Groothuis freebsd_committer 2006-02-12 10:46:44 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mnag

Over to maintainer
Comment 2 Doug Barton 2006-02-19 08:32:30 UTC

You can't seriously be saying that you want sshd and/or rc.d to do
everything you tell it to except for the part of what you're telling it to
do that isn't so smart, then you want them to save you from yourself? :)

Seriously though, the real question here is why do you want to restart sshd?
If all you want is to have sshd reread its config file, you can accomplish
that by HUP'ing the parent process. Can you please respond and confirm that
this is what you're after? If so, that's easily added as a 'reload' command
to the script.



	If you're never wrong, you're not trying hard enough
Comment 3 Marcus Alves Grando freebsd_committer 2006-02-21 19:45:50 UTC
State Changed
From-To: open->closed

Fixed. Thanks.