if you are behind a NAT and you want your gateways IP then goto whatsmyip.net and it will spit out the IP it sees
as for hiding behind the NAT you want to foward port 22 (or hatever you use, i dont recomend the default) to the IP of the device you want to ssh into, if you dont control the gateway (ie work) then try a default password (the evil way) or you have 2 options
1: Reverse ssh/telnet, involves getting the Z to ssh and port foward to a machine you own. you then connect to the machine you own which connects you to the Z, encrypts data twice (overhead)
2: VPN and fowarding, creates a private address range of physically seperate machines (ie 10.0.0.x might be in japan while 10.0.1.x might be in sydney) that appear local. i am thinking about offering this to people from my server.
btw are we talking about <generic brand> routers here or a DIY linux/openBSD special? makes a diffrence in how you set up the port fowarding (and if you blocked incomming connections properly, remeber only allow "established" connections in
if you are using <generic brand> routers then they have support for dyndns updates these days. however if you drop the line more than twice an hour you might get periods of no conectivity (affects me for eg) or if you own a dowain name and server its posible to update your ip via ssh, but thats getting a bit complex (thats what i like)
i remeber writing up a sshd tricks guide in the security fourm somwhere , should dig that up and add it to my tag