The following scp is working as expected.
scp /home/admin/* root@ec2-50-112-212-73:/
But I need a command that will create the required folder structure on destination server if it does not already exist.
I can do it in 2 steps as shown below. I will like to know if there is any other way.
ssh root@ec2-50-112-212-73 " mkdir -p /home/admin/ " scp -r /home/admin/* root@ec2-50-112-212-73:/home/admin/