I found out that, the reason for this problem was due port issue. In my university they are using cyberoam and they have blocked some ports which were being used by ssh to fetch data from remote.
I just tried same steps at home and it is working as expected.