Ssh – Periodically SSH process hangs on AIX

aixprocessssh

On one of our AIX servers, the following ssh process hangs sometimes:

Server1# ssh -i /rsync-key Server2 "rm file" &

It is a string of script in the crontab.

This problem is not always reproduced. Here is an example:

Server1 # ps aux | head -n2
USER          PID %CPU %MEM   SZ  RSS    TTY STAT    STIME  TIME COMMAND<br>
root      9241056  1.8  0.0 2112 1700      - A    06:11:44 241:57 ssh <br>

Server1 # cat /proc/9241056/psinfo
ssh /rsync-key Server2 rm file

Server1 # truss -p 9241056
Absolutely no output

Server1 # kill -9 9241056
Server1 # ps -edf | grep 9241056 | grep -v grep
    root  9241056        1  65 06:11:44      - 249:38 ssh

Server 1:

#oslevel -s
6100-09-02-1412

#lslpp -l | grep openssh         
openssh.base.client     6.0.0.6103  COMMITTED  Open Secure Shell Commands
openssh.base.server     6.0.0.6103  COMMITTED  Open Secure Shell Server

#ssh -v
OpenSSH_6.0p1, OpenSSL 1.0.1e 11 Feb 2013

Server 2:

#oslevel -s
6100-07-05-1228<br>

#lslpp -l | grep openssh
openssh.base.client     5.8.0.6101  COMMITTED  Open Secure Shell Commands
openssh.base.server     5.8.0.6101  COMMITTED  Open Secure Shell Server

#ssh -v
OpenSSH_5.8p1, OpenSSL 0.9.8r 8 Feb 2011

Best Answer

Why do you use & in crontab? The process will not terminate as long as it will run on the remote machine, only if it takes too long and in the meantime the Internet connection will fail.