SSH hangs upon exit when running from a cronjob. Server only allows SSH2 (does not appear to have the same problem when using Protocol 1). Redhat 6.2 Hardware independant. Using OpenSSL 0.9.5a configure line: ./configure --sysconfdir=/etc --with-tcp-wrappers --without-pam --with-ssl-dir=/usr/local/src/openssl-0.9.5a --with-md5-passwords The application is to execute remote code on another server via "passwordless" ssh. Keys generated are rsa. When run manually (outside cron), executes and exits normally.
I will second this. It seems to just hang after a while even though both the server and the client are configured with KeepAlive enabled. It also looks to both sides like the connection is still open. The forwarded ports are still in netstat output but they do not pass any information. I'm turning off -N to see if that helps and moving to my own keepalive login shell. We'll see if that works.
Ooops. I'm running: client on Linux RH7.X: OpenSSH_3.0.2p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f server on FreeBSD 4.5: OpenSSH_3.0.2p1
Please see if you can reproduce with the latest version
5 months no reply == closed bug
I apologize I didn't not see the request for more testing. We have tried this very recently with 3.6.1p2 and see the same issue.
Does the same thing happen if you run from the command line with nohup? You can also use strace/truss or equivalent to see what it's trying to do when it hangs. Make sure the cron job will take a while (add some sleeps if you have to) then wait until the cron job starts, find out ssh's pid and use "strace -p [pid]" to attach to the process. Once you have the results, add the last 100 lines or so as an attachment to this bug. Also, the commands at the other end of the pipe might behave differently when they don't have a pty. Try adding "-t" to ssh's command line to force the server to allocate one.
No reply == no bug (again!)
Mass change of RESOLVED bugs to CLOSED