Is the server there?

First ping the host to make sure you can talk to the machine the server resides on.

$ ping -c1 myhost
PING myhost (127.0.0.1) from 127.0.0.1 : 56(84) bytes of data.
64 bytes from myhost (127.0.0.1): icmp_seq=0 ttl=255 time=250 usec

If the machine pinged successfully, attempt to telnet to the host and port to verify that the dataserver is listening.

$ telnet myhost 1433
Trying 127.0.0.1...
Connected to myhost.
Escape character is '^]'.
If you get output like this the dataserver is listening. If you get a 'Connection Refused' message then either the dataserver is down, you have the port wrong, or you're talking to the wrong host.

If telnet works, the next step is to run the tsql program. tsql can be run in two ways, one which uses the freetds.conf and one which connects directly using the host and port. First attempt a connection using host and port.

$ cd src/apps
$ ./tsql -H myhost -p 1433 -U user
If you receive a message of 'Login Failed.' then your connectivity is ok, but you have a authentication issue.

If you receive a message like

 Msg. No.: 18450 Severity: 14 State: 1 Login failed- User: loginid Reason: Not defined as a valid user of a trusted SQL Server connection
SQL Server is accepting only "domain" logins. This applies only to Microsoft SQL Server and you'll need to have your DBA verify that "server logins" are allowed, or configure FreeTDS with domain support (experimental).

Finally if you received a prompt, then try tsql using the server name.

$ ./tsql -S myserver -U user
If this fails, FreeTDS is either not finding your freetds.conf file, finding the wrong one, or there is an error in the file.