Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

Re: X11 Forwarding

Subject: Re: X11 Forwarding
Date: Wed, 20 Apr 2005 09:11:13 -0400
On Tue, Apr 19, 2005 at 11:42:50AM -0500, Christ, Bryan wrote:
I have learned the hard way that sshd cannot be restarted remotely

Incorrect.

(sshd
does not respond to HUP).

True, but it exits cleanly on a TERM.

Apparently, sshd forks a new sshd process
when a new connection is made

Only a new child process.

and the new sshd process reads the config
file anew.  Therefore, there shouldn't be any need to restart.

Incorrect.

Can anyone confirm this?  I've never truly found the definitive answer
for this.

You should stop and restart the parent sshd whenever you changed the
sshd_config file.  Killing the parent sshd (the one whose PID is in
/var/run/sshd.pid) will not cause the children to be terminated, so
it's safe even over a remote ssh connection (as long as you don't lose
your session before you can start the new sshd).

I do the following all the time whenever I upgrade ssh on a remote box:

ssh remotebox
mv /usr/local/sbin/sshd /usr/local/sbin/sshd.old
put the new software in place
/sbin/init.d/ssh stop
/sbin/init.d/ssh start

My /sbin/init.d/ssh is attached for reference.  It's for HP-UX 10, but
the same principles apply to anything even remotely close to SysV init,
just with different paths.

Attachment: ssh
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>