Importing via sqlcmd errors out
If you are really sure that your Server name is correct you can still try to specify the port explicitly like that:

sqlcmd -S SQLMAIN,1433 -i rdmdb.sql 


If you run your SQL Server database as a Contained Database it might be necessary to login to the database direclty using -d:

sqlcmd -S SQLMAIN,1433 -d yourDatabase -i rdmdb.sql 


Make sure that you really can access your SQL Server on the specified port. You can try this using telnet.

telnet SQLMAIN 1433


If you don't use a windows login you might need to provide your username and passowrd using -U (Username) and -P (Password). 

sqlcmd -S SQLMAIN,1433 -d yourDatabase -U User -P Password -i rdmdb.sql 


If you use the integrated authentication, you can also try the Trusted Connection using -E

sqlcmd -S SQLMAIN,1433 -d yourDatabase -E -i rdmdb.sql 


Please be also be sure that the specified input file can be accessed and found at your specified location.

Hopefully this will answer your question and your getting your connection to work. :-)