Like demon said, as soon as you connect to anything on the iternet, you're basically givin out your ip. So "give out your ip" argument is bull. It's a common misconception coming from paranoia that has zero grounds.
That being said as far as the server goes, don't open any ports other than minecraft's, default being 25565 iirc. As long as you don't set any remote accessing methods (eg ssh) then it's technically impossible to get "into" your computer, though I won't say 100% safe simply becUse there are ALWAYS exploits for this or that. However, alsorecognize that doing so would take a shitton of effort and then ask yourself, "Who would waste their time to hack into my server?"
As far as YC's security goes, the ssh port is a non-default port, requires a ppk key which also has a 40 char pass phrase to use, as well as a standard lengthed 16 key passcode to log into the user on the box itself. So yeah. Have fun getting through that. xD

