Isn't he listed on the birth certificate as your husband? If so, then he's listed as the father, the legal father.
I was having a hard time getting my ex to sign the divorce papers after I left him and met someone else. I was told by my doctor that I couldn't get pregnant but I did. You cannot get divorced if you're pregnant and you cannot list another man as the father of the baby when it's born. You have to put down your husband's name, so therefore, he is the legal father.
The good news for you now. To establish paternity (so that your ex has no parental rights to this child), hire a lawyer and sue him for paternity. My ex even refused to sign the paternity knowing for sure there was no way possible he was the father of this child until my lawyer told him that if he didn't sign, we were going to sue him for child support on this child, my living and clothing expenses while I was pregnant, my hospital bills and all of the baby's hospital bills. He signed and returned the paternity papers within a week after that.
My divorce and paternity was right around $1,700.00 so it's not cheap but if something should happen to you, God forbid, he will be the legal father rather the child has your maiden name or not, and he'll have custody of the baby.
If you need to, get a restraining order against him to keep him away from you and your baby. Until custody is established, the parent who has physical custody of the child has legal custody so it might be a good idea to get the custody established right away because if he was to take the baby then there isn't any thing to you can do legally, until you go to court. He may be vindictive enough to do something like that.
Best of luck and if you need any further advice, just send me a message.