scpazure-app-service-plansazure-appserviceazure-app-service-envrmnt

Is there any way to copy files to Appservice container over remote shell?


We were able to successfully connect to the Appservice container using the remote shell using below az command.

az webapp create-remote-connection --subscription ******** --resource-group myrg -n mywebapp &

we were able succesfully ssh to the appservice container with the given port with root user and password.

ssh root@127.0.0.1 -p 359xx

But when we tried to copy files from local machine to the container,its throwing permission denied.

scp -p 359XX myfile root@127.0.0.1:/tmp/

Solution

  • I succeeded with:

    rsync -az --bwlimit=500 -e 'ssh -p <port> -c aes256-cbc' ./database.sql.tar.gz root@127.0.0.1:~/
    

    The --bwlimit bandwidth limit argument was the success factor.

    In my case I had to specify the cypher algorithm(-c aes256-cbc) but if you can ssh without then in the rsync command you don't need it as well.