I have the following bash script
#!/bin/bash
ssh -o "StrictHostKeyChecking no" ubuntu@$1
cd /home/ubuntu
wget google.com
When I run it, ./test.sh I am ssh'd into the remote server but the wget command is not run unless I press ctrl+d and then the ssh session exits and the index.html file is saved to /home/ubuntu
How can I change this bash script so that I can save the index.html file on the remote server?