For remote access to the SQL Server, you have to change the configuration of the SQL Server first, see Configuring remote access.

Additionally, you have to adjust the firewall settings, see Firewall settings for remote access.