If you face a problem while connecting to remote sql server please make sure below configurations are done

1. Enable the "Named Pipes"--> Go to  SQL Server Configuration Manager-->SQL Server Network Configuration-->Protocals for "sqlserver"

2. Specify TCP Port