Connecting to Azure website via FTP

ぃ、小莉子 提交于 2019-11-27 17:34:08

In the current azure portal the deployment credentials can be set by going to App Services / select relevant app service item / in the Deployment section / Deployment Center / FTP / Dashboard. You can either chose to use the preprovided App Credentials or assign User Credentials.

In the previous generation azure portal the deployment credentials can be set up by going to WEB APPS / select relevant item / DASHBOARD / Reset your deployment credentials.

Make sure you're specifying siteName\userName as your login name. The site name portion is required!

The default directory for the web content is \site\wwwroot which can be set as the initial directory for many FTP clients.

If you want use default value you need to download publish profile in your dashboard for your site:

[UPDATE for new Azure UI]

It will be xml file. Open it and find your credentials. Sample:

  <publishProfile
    profileName="nameofyoursite - FTP"
    publishMethod="FTP"
    publishUrl="ftp://waws-prod-blu-001.ftp.azurewebsites.windows.net/site/wwwroot"
    ftpPassiveMode="True"
    userName="nameofyoursite\$nameofyoursite"
    userPWD="sOmeCrYPTicL00kIngStr1nG"
    destinationAppUrl="http://nameofyoursite.azurewebsites.net"
    SQLServerDBConnectionString=""
    mySQLDBConnectionString=""
    hostingProviderForumLink=""
    controlPanelLink="http://windows.azure.com">
    <databases/>
  </publishProfile>

Where your credentials:

publishUrl="ftp://waws-prod-blu-001.ftp.azurewebsites.windows.net/site/wwwroot"

userName="nameofyoursite\$nameofyoursite"

userPWD="sOmeCrYPTicL00kIngStr1nG"

Source: Azure Web Sites FTP credentials



Connection from command line on OS X:

Console client:

ftp ftp://nameofyoursite:sOmeCrYPTicL00kIngStr1nG@waws-prod-blu-001.ftp.azurewebsites.windows.net/

Mount from console:

mkdir /Users/<YOUR_USER>/FTP_AZURE
mount_ftp nameofyoursite:sOmeCrYPTicL00kIngStr1nG@waws-prod-blu-001.ftp.azurewebsites.windows.net/ /Users/<YOUR_USER>/FTP_AZURE
cd /Users/<YOUR_USER>/FTP_AZURE

Open for editing in VIM:

vim ftp://nameofyoursite@waws-prod-blu-001.ftp.azurewebsites.windows.ne//site/wwwroot/

Note user name here: nameofyoursite NOT nameofyoursite\$nameofyoursite

To be complete, you can FTP using two different credentials

1, it is already mentioned by @0x8BADF00D, if you downloaded the 'publish profile', you can see the automatically generated credentials for each site.

in short, if x=your website name, then username=x\$x and the password is a long system generated string

obviously, this is not meant for human user...at least I cannot easily remember a 20+ character random string...

2, there is a more user friendly way, you can set a username and password in azure portal

however "deployment user name" is directly tied to a Microsoft Account, it is the same for all your webapps. In order to use it to ftp into different webapps, you need to add a prefix.

Here, my username is "blabla", my website name is "test" ==> my FTP username is thus "test\blabla" (mind the backslash on windows) followed by the password I set on azure portal (no modification required)

here are the references from Azure:

why there are two credentials for FTP

how to login with the user friendly credential

In the Azure portal (end of 2018):

  1. Go to your app
  2. In the left pane, select Deployment Center
  3. In the middle pane, select FTP
  4. Click view dashboard, and there you have your ftps connection url, username and password.

You must enable FTP/S on your web app to actually be able to connect! This is done under Application Settings -> FTP Access in the Azure portal

These two blades give all the required information to connect via FTP.

App Service > Settings > Properties

App Service > Deployment > Deployment Center > Deployment Credentials

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!