After staring 2 hours to this issue, found the mistake. Chose wrong location for the authorized.crt (while doing it correct for the nx user…)
## Add new public key to authorized.crt of ec2-user
mkdir -p /home/ec2-user/.nx/config
sed ‘s/.*[[:space:]]\(ssh-dss[[:space:]][^[:space:]]*\).*/\1/’ /var/NX/nx/.ssh/default.id_dsa.pub >> /home/ec2-user/.nx/config/authorized.crt
chown ec2-user:root /home/ec2-user/.nx/config/authorized.crt
chmod 0644 /home/ec2-user/.nx/config/authorized.crt