In order to successfully get the agent from the AppDynamics site, please use the below syntax.
wget --save-cookies cookies.txt --post-data 'firstname.lastname@example.org&password=password' --no-check-certificate https://login.appdynamics.com/sso/login/
This will create a cookies.txt file that will allow you to pass your username and password correctly in the next command.
wget --load-cookies cookies.txt https://download.appdynamics.com/onpremise/public/archives/22.214.171.124/AppServerAgent.zip -O agent.zip
This will download the agent and put it in t folder named agent.zip.