'Scp connection timed out ubuntu VM

so i'm trying to copy a file for my directory to Azure ubuntu VM , SSH works just fine ,but scp command takes a lot of time and then i had this message

connect to host 10.x.x.x port 22: Connection timed out lost connection

this is the command i used :

scp -vvv -i .ssh/id_rsa BaltimoreCyberTrustRoot.crt.pem [email protected]:/var/www/html


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source