Issue with lengthy command for SSH Relay

Hi,
We are using PAM 3.2 (OS:Redhat). We have successfully configured ssh-relay rule and it is working fine and execute general commands.Today we have noticed that if going to execute a lengthy command then after completion of first line the remaining portion of command is continuing in the same line from the left side of cursor and command is not executing also.

i.e this happens somthing like below
[priv_user@pamserver~]
commandcommand[priv_user@pamserver~]$ commandcommandcommandcommandcommand