Limits are process-specific.
ulimit is a shell bultin and changes the limit only for that shell and the processes started from that shell.
sudo ulimit wouldn't make any sense even if it worked since the limit would only change in the processes started under that
sudo, and there are none.
In order to raise your limit above the hard limit you have to either raise the global hard limit for all users or set a different limit for your specific user. Those limits are defined in
/etc/security/limits.d/). Edit this file and create a new entry for your user:
sunpy hard nofile 65535
Save the file and open a new session. Afterwards calling
ulimit -Hn inside the new session should show you the new hard limit for the number of open files. In order to use the hard limit, you have to raise your current soft limit to the hard limit by calling
ulimit -n 65535.
Of course you can also change your soft limit permanently by specifying soft instead of hard in your
/etc/security/limits.conf. Then you don't have to raise your soft limit manually, but the new limit will apply for each of your sessions.
Oh, and according to this answer it seems like you have to edit
/etc/pam.d/common-session* and add:
session required pam_limits.so
if not already done. Otherwise those limits won't apply for your sessions.