3 thing you need to take care of if you want to connect to the remote sql server.
1) You need to get the IP address of that SQL Server.
2) Make sure the TCP/IP is enabled in that SQL Server and the port no is 1433 in the Configuration Manager in that SQL Server.
3) Make sure the firewall access for that port i.e. 1433 is enabled in that SQL Server.
Then using this code:
Server=myServerAddress,portNo;Database=myDataBase;User Id=myUsername;
Password=myPassword;
you can connect to the remote SQL Server.
Best of luck.