Hi! On Thu, 27 Jun 2002, Roman Drahtmueller wrote:
Actually, rcsshd restart should stop the daemon with the pid from /var/run/sshd.pid. Then a new daemon would start up, writing its pid to the same file. The running instances of sshd which handle active connections should not get touched. There used to be a killall to nuke running daemons, but this is hundreds of years ago.
However, in SuSE 7.0 (and possibly other versions) there used to be the problmen that "rcsshd restart" stopped the "main" sssh daemon, but refused to restart it if there were old children still running... (I hope this was fixed in the update packages?!?)
To make sure it works, I usually do the following: cp /usr/sbin/sshd /sshdd /sshdd -p 23 rm /sshdd # log on to port 23 killall sshd rcsshd start # log on to port 22 killall sshdd
Cool.:-) I used the following: echo "rcsshd restart" | at now + 2 minutes and then logged out of all ssh sessions. Of course, that's slightly more risky than your approach... Martin