Note: This page applies to SFTP Gateway version 2.x. Visit Here for documentation on version 3.x.
When you provision the SFTP Gateway VM, you will need to go through a one-time setup process. You will need to SSH into the VM to obtain the default password for the web page. And if you are uploading files to Blob, you will need to set the Storage Account keys.
1. SSH into the virtual machine
Find the Public IP address for your VM. For details on how to do this, see this article.
SSH into the VM. For details on how to do this with PuTTY, see this article.
From Mac or Linux, use the following command:
ssh -i private.key username@ip-address
When prompted that the
authenticity of host can't be established, type
yes to proceed.
This message appears the first time you SSH into any VM.
2. Get the default admin password for the web page
The web admin UI is protected by a username and password. The username
is set to
admin, and this cannot be changed.
The default admin password is saved in the file
To get this password, run the command:
sudo cat /root/default-sftpgateway-password.txt
If you want, you can reset the admin password using the following command:
You will be prompted to enter and confirm the admin password.
Note: The admin account for the website is different than the Linux admin that you defined when provisioning the VM.
3. Create a Storage Account
If you already have a storage account, feel free to skip this step.
Note: When launching a VM, the default setting from the Management tab creates a Storage Account for boot diagnostics. The storage account name is based on your resource group, followed by "diag". You can use this as an existing storage account -- just be aware that when deleting your resource group, your Blob Storage will disappear along with it.
Within the Azure portal, go to Storage Accounts > + Add.
This takes you to the Create storage account screen.
On the Basics tab, fill out the following fields:
- Resource group: Click the Create new button and specify a name.
- Storage account name: Enter a globally unique name.
- Account kind: Change StorageV2 to BlobStorage.
- Replication: To save on costs, select Locally-redundant storage (LRS).
Click Review + create
On the Review + create screen, click Create.
For more information, see the official documentation.
4. Get the Storage Account access keys
Go to Storage accounts > Access keys.
Under key1, copy the Key string.
5. Open the web interface
Navigate to the VM's Public IP address from a web browser.
You will see a landing page with a link that says Click here. Click this link, and the HTTPS site will load in a new tab.
You will see some SSL warnings. Follow the instructions from the landing page to bypass these warnings.
Unless you have already reset the admin password, you will see the following page:
Click the "X" at the top right to close the window.
Finally, you should see the login screen. Enter the password that you obtained in previously.
6. Set the Storage Account keys
If you are uploading files to Blob, you will need to set the Storage Account keys. This gives SFTP Gateway access to your storage account.
Go to the Settings page, and you should see the following screen:
Enter the Storage Account Name and Storage Account Key.
Where to go from here
Next, visit the Azure Basic Usage page to create an SFTP user and upload a file.