Hello, On 13 April 2015 at 15:10, dan mclaughlin <thev...@openmailbox.org> wrote: > On Mon, 13 Apr 2015 16:49:02 +0530 Hrishikesh Murukkathampoondi > <hris...@gmail.com> wrote: >> Hello >> >> I am running OpenSD 5.6 on a x86 netbook. I am trying to setup X11 >> forwarding in ssh. >> >> In sshd_config I have added >> X11Forwarding yes >> >> In ssh_config I have added >> ForwardAgent yes >> ForwardX11 yes >> >> I have restarted sshd (pkill -HUP sshd) and when I start ssh from the >> client using ssh -X I get DISPLAY is not set when trying to launch an xterm. > > this is probably a bad idea. that will send the signal to all sshd processes, > and not just the main server. > > the proper way to restart sshd is to use the pid in /var/run/sshd.pid ie > > $ kill -1 $(</var/run/sshd.pid)
Noup, kill HUP is completely okay. Have a look: $ uname -r 5.6 $ grep -A 2 rc_reload /etc/rc.d/sshd rc_reload() { ${daemon} ${daemon_flags} -t && pkill -HUP -f "^${pexp}" } and for clarity: $ grep pexp= /etc/rc.d/rc.subr |tail -1 pexp="${daemon}${daemon_flags:+ ${daemon_flags}}" -- Regards, Ville