Initial SSH login to the HP-UX 11.31 is slower without any errors.
Check the /var/adm/wtmp and /var/adm/wtmps files. IF it is huge in size. Move the file and re-create the file.
Found that the /var/adm/wtmps file is very huge.
Take a copy of the existing wtmps file and run the below command to empty the file.
# cat /dev/null > /var/adm/wtmps
This command empties the file and doesnt corrupt the wtmps file.
Alternatively you also delete and recreate this file.
Issue resolved after emptying the wtmps file.