Previously i was using jsch version 0.1.55. I upgraded jsch version to 0.2.17 and the issue was resolved.