I figured out a way to connect to the node via the local ip address:
basically make sure that name contains the ip address (not the hostname) like described here: Dynamic node naming with distillery?. then i can connect via:
iex --name debug --cookie 'secretcookie' --remsh myapp@172.16.0.109
that works but is not ideal. Is there any way to call the remote shell via the hostname?