Error opening a SFTP session on WinSCP – User not logging to an HP-UX server

The user was able to login using ssh but whenever he tried to use WinSCP to transfer a file using SFTP, it didn’t connect

Checking the /var/adm/syslog/syslog.log file I saw the following entries

Feb 26 08:51:45 hp-ux sshd[28906]: SSH: Server;Ltype: Version;Remote:;Protocol: 2.0;Client: WinSCP_release_4.1.9
Feb 26 08:51:46 hp-ux sshd[28906]: Accepted keyboard-interactive/pam for SFTP-USER from port 61837 ssh2
Feb 26 08:51:46 hp-ux sshd[28906]: error: PAM: pam_open_session(): Can not make/remove entry for session

This problem was solved when I ran a command to unlock user

root@hp-ux:/ # /usr/lbin/modprpw -l -k SFTP-USER