There's a page on ACS's documentation regarding ssh tunneling into master nodes, it can be found here: https://azure.microsoft.com/en-us/documentation/articles/container-service-connect/
Say you have an Azure Container Service named my-acs running on the East US region, and your user name is myuser, and you would like to access the DC/OS dashboard of your cluster,
sudo ssh -L 80:localhost:80 -f -N my-user@my-acsmgmt.eastus.cloudapp.azure.com -p 2200 -i path/to/your/private/key
If you would like to directly access the terminal of your master, you would use:
ssh my-user@my-acsmgmt.eastus.cloudapp.azure.com -p 2200 -i path/to/your/private/key
However, I do not know how to connect directly into an Agent node.