System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

scripts hanging with SSH sessions

Pratheesh
Advisor

scripts hanging with SSH sessions

We have a strange problem related to the scripts started with SSH remote sessions.

We have our application running in RHEL3 update 6, which is a mix of shell scripts(which we are starting in nohup) and executables created with g++. We have installed this application in atleast 10 machines and in one machine the the shell scripts and the executables HANGs when we start the application by logging into the mchine through SSH and kept the session idle.

Since the machine had only SSH enabled, we don't know the situation with rlogin/telnet.

when we searched in itrc, we have seen that the issue is happening because of the processes are associated to the SSH.

1) When we kill the ssh session process, everything start working normally.
a) Once, we have seen with ps -ef | grep -i ssh that the session is with term type as hpfms@notty. When we killed this process, everything started working fine.
b) Next time it happenend, the SSH process was running but there was no notty. At this time also, when we killed this process, everything started working fine.

I have seen similiar discussion threads but, there was no real conclusion on the problem anywhere.

Can somebody help me to solve this issue? Are there any environment setting or SSH options to come out of this?

Thanks and Regards,
Pratheesh.
3 REPLIES
Steven E. Protter
Exalted Contributor

Re: scripts hanging with SSH sessions

Shalom,

There is debug mode.

Change ssh calls to ssh -vvv

You will get good diagnostics to help solve the problem.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pratheesh
Advisor

Re: scripts hanging with SSH sessions

Hi Steven,

Thanks. The problem is that the machine is a production machine and we can login through puTTY only. I tried in one of our test machine where option -w is not available though -v is there.

1) From the forum discussions, I had seen that many have faced similiar issues but without any clear conclusion. I am just wondering whether anybody have some idea about this.

2) As we have atleast 9 other machine running with similiar applications and didn't anywhere this problem. So, I am guessing its something to do with some configuration or env parameters.
Robert Walker_8
Valued Contributor

Re: scripts hanging with SSH sessions

Gday Pratheesh,

Make sure the authorised_keys on the other end dont have the following items prior to testing:

user/.ssh/authorized_keys:
no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty ssh-rsa

This can result esp no-pty from allowing interactive login via ssh (we set this up for file transfer only).

Also make sure your ssh keys from remote host /.ssh/id_rsa.pub should match authorized_keys for remoting in user.

If they are take them out.

Robert.