Differences

This shows you the differences between the selected revisions of the page.

2026-05-20 2026-05-20
no summary (martin) no summary (martin)
Line 1: Line 1:
~~NOINDEX~~ ~~NOINDEX~~
====== Connecting securely to Microsoft Azure Storage with SFTP ====== ====== Connecting securely to Microsoft Azure Storage with SFTP ======
-With WinSCP you can easily upload and manage files on your Microsoft Azure instance/service over [[sftp|SFTP protocol]] or [[ftps|FTPS]] protocol.+With WinSCP you can easily upload and manage files on your Microsoft Azure Storage account contained with [[sftp|SFTP protocol]].
===== Before Starting ===== ===== Before Starting =====
Line 7: Line 7:
Before starting you should [[guide_install|have WinSCP installed]]. Before starting you should [[guide_install|have WinSCP installed]].
-===== [[linux]] Connecting to a Linux Virtual Machine with SFTP =====+===== Enabling SFTP access to the container =====
-First, collect information about your virtual machine instance, on the [[https://portal.azure.com/|Azure portal]]: +··* SFTP access to supported by storage accounts with hierarchical namespaces enabled (aka Azure Data Lake Gen2 storage accounts). Existing Blob service accounts need to be upgraded
- +  * To enable SFTP access for exiting hierarchical storage accounts, in storage account view, go to //Settings > SFTP// and click //Enable SFTP//. 
-··* Host name: +  * When creating new storage account, on //Advanced// page, check //Enable hierarchical namespace// and //Enable SFTP//.
-   * Use IP address you find in the //Public IP address// section on your virtual machine instance page; +
-    * Or setup a DNS name for the virtual machine by clicking on the //Configure// link in //%%DNS%% name// section. A //Configuration// panel opens. There, in the //%%DNS%% name label//, enter a sub domain for your virtual machine. Click //Save// button. A full hostname now appears in the //%%DNS%% name// section in a format ''subdomain.location.cloudapp.azure.com''+
-  * Username: Use the username, that you created, when creating the virtual machine. +
-  * Host key fingerprint: On the first connect you will be prompted to [[ssh_verifying_the_host_key|verify server host key]]. \\ To securely acquire a fingerprint of the host key: +
-    * On your virtual machine instance page, use [[https://learn.microsoft.com/en-us/azure/virtual-machines/linux/run-command|//Run command// function]]. You will find it in the virtual machine menu, in //Operations// group. +
-    * Select //"RunShellScript"// command. +
-    * Paste the following command: <code bash>for f in /etc/<nohilite>ssh</nohilite>/ssh_host_*_key; do ssh-keygen -l -f "$f"; done</code> +
-    * You will get an output like: <code>256 SHA256:bKKCom8yh5gOuBNWaHHJ3rrnRXmCOAyPN/WximYEPAU /etc/ssh/ssh_host_ecdsa_key.pub (ECDSA) +
-256 SHA256:IYeDl+gseYk46Acg4g2mcXGvCr7Z8FqOd+pCJz/KLHg /etc/ssh/ssh_host_ed25519_key.pub (ED25519) +
-2048 SHA256:rA0lIXvHqFq7VHKQCqHwjsj28kw+tO0g/X4KnPpEjMk root@myazurevm (RSA)</code> The set of key types will vary with your virtual machine image. +
-  * When creating new virtual machine, prefer setting up public key authentication by pasting your public key to //%%SSH%% public key// box in the //Basics// step in the //Administrator account// section. If you want to setup public key authentication later, you have to [[guide_public_key|set it up manually]]. +
- +
-To connect to a virtual machine instance with SFTP, start WinSCP. [[ui_login|Login dialog]] will appear. On the dialog:  +
- +
-  * Make sure //New site// node is selected. +
-  * On the //New site// node, make sure //%%SFTP%%// protocol is selected. +
-  * Enter //Host name//. +
-  * Enter //User name//. +
-  * Enter a password for the username. Or [[ui_login_authentication|specify a private key]], if you set up a public key authentication.. +
-  * Save your site settings using the //Save// button. +
-  * Login using the //Login// button. +
-  * [[ssh_verifying_the_host_key|Verify the host key]] by comparing fingerprints with those collected before (see above).  +
- +
-&amp;screenshotpict(azure_linux) +
- +
-===== [[windows]] Connecting to a Windows Virtual Machine with FTPS ===== +
- +
-First you need to [[guide_azure_ftps_server|install a FTPS server on the virtual machine]]. +
- +
-To connect to the virtual machine with FTPS, start WinSCP. [[ui_login|Login dialog]] will appear. On the dialog:  +
- +
-  * Make sure //New site// node is selected. +
-  * On the //New site// node, select //FTP// protocol and //TLS/SSL Explicit encryption//+
-· * In //Host name// box enter an address of your virtual machine: +
-    * Use IP address you find in the //Public IP address// section on your virtual machine instance page on the [[https://portal.azure.com/|Azure portal]]. +
-    * Or setup a DNS name for the virtual machine by clicking on the //Configure// link in //%%DNS%% name// section. A //Configuration// panel opens. There, in the //%%DNS%% name label//, enter a sub domain for your virtual machine. Click //Save// button. A full hostname now appears in the //%%DNS%% name// section in a format ''subdomain.location.cloudapp.azure.com''+
-  * Enter username and password of an account you want to connect with. Use the account you have specified when creating the instance or any other account you have created on the instance. +
-  * Save your site settings using the //Save// button. +
-  * Login using the //Login// button. +
-  * If you are using [[guide_windows_ftps_server#certificate|self-signed certificate]], you will be prompted to [[tls#certificate|accept it]]. +
- +
-&screenshotpict(azure_windows) +
- +
-===== [[appservice]] Connecting to an App Service (Web Site) with FTPS ===== +
- +
-First, collect information about your app service (previously web site), on the [[https://portal.azure.com/|Azure portal]]: +
- +
-  * Host name: Copy host name from //FTPS hostname// section on the //Overview// page+
-  * User Name: Copy username from the //FTP/deployment username// section on the //Overview// page. If you did not set up an %%FTP%% account yet, goto //Deployment Center// page and select //FTP// in //Manual Deployment// section and switch to //User Credentials// tab. User name has a form ''name\user''. You need to use both parts when authenticating. +
- +
-To connect to the web site with %%FTPS%%, start WinSCP. [[ui_login|Login dialog]] will appear. On the dialog:  +
- +
-  * Make sure //New site// node is selected. +
-  * On the //New site// node, select //FTP// protocol and //TLS/SSL Explicit encryption//. +
-  * In //Host name// box paste a host name of your instance in format ''%%waws-prod-xxx-xxx.ftp.azurewebsites.windows.net%%''. You can also paste a complete %%URL%% to select protocol, encryption and insert host name at once. +
-  * Enter the //User name// and the //Password//. +
-  * Save your site settings using the //Save// button. +
-  * Login using the //Login// button. +
-  * Web site [[tls#certificate|TLS/SSL certificate]] is signed by a trusted authority, so you won't be prompted to verify it. +
- +
-&screenshotpict(azure_website) +
- +
-==== Automating Access to the App Service ==== +
- +
-See example for [[guide_microsoft_azure_webjob_sftp#deploying_auto|automating update of a WebJob on an App Service/Web Site]].+
===== Further reading ===== ===== Further reading =====
  * Guide to [[guide_upload|uploading files to SFTP/FTPS server]];   * Guide to [[guide_upload|uploading files to SFTP/FTPS server]];
-  * Guide to [[guide_automation|automating operations]] (including upload)+  * Guide to [[guide_automation|automating operations]] (including upload).
-  * Guide to [[guide_amazon_ec2|connecting to Amazon EC2 server with SFTP]]; +
-  * Guide to [[guide_google_compute_engine|connecting to Google Compute Engine server with SFTP]].+

Last modified: by martin