Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting to Azure File Share from Mac: No Route to Host

I'm trying to connect to an Azure file share from my Mac running High Sierra 10.13.6 using the following command:

mount_smbfs -d 0777 -f 0777 //dolphins:[email protected]/models /Users/b3020111/Azure

However I keep getting the error:

mount_smbfs: server connection failed: No route to host

I have turned off packet signing in /etc/nsmb.conf:

[default] signing_required=no

After looking around the web I seem to be at a loss as to where to go, any help is appreciated.

like image 956
Trotts Avatar asked Aug 23 '18 11:08

Trotts


People also ask

How do I map a network drive to Azure?

Steps: Join the Azure Storage Account containing the file share to AD (https://docs.microsoft.com/en-us/azure/storage/files/storage-files-identity-ad-ds-enable) Sync AD Users that need to map the drives to Azure AD using Azure AD Connect.


2 Answers

I got it working with azure provided connection example.

mount_smbfs -d 777 -f 777 //user:key@storageurl/folder ~/mountfolder

Folder in file share needed after url and mountfolder must exist.

But the main reason for "No route to host" was because the access key had forward slash in it! I did a rebuild of key1 until I got a key without forward slash.

BUT! Be aware, rebuilding key will kill all mounts and connections to that storageaccount.

like image 182
Spinevans Avatar answered Nov 16 '22 03:11

Spinevans


Came across this issue myself today. Do double check that your ISP does not block SMB port 445. In my case, AT&T does actually block this port. I found this in their guide http://about.att.com/sites/broadband/network

The solution for me was to connect with a VPN which I'm already hosting on Azure. Additionally as others have mentioned in this thread, escape any / with %2f. Also, add the share name in the connection URL. For example, if your share name is my-data then the connection URL should contain xxx.file.core.windows.net/my-data.

This is omitted for some reason in the Azure docs/UI and was required for successful connection on OSX.

like image 40
ElPresidente Avatar answered Nov 16 '22 02:11

ElPresidente