Well of course that depends what you are doing!
I was just double checking that server A can connect to server B directly, I know you can access server B through SSMS but can you set up server b as a linked server with the sql authentication on server A (apologies if you've told me you can already btw). Does the sql user have the adequate rights to use the replication objects?
I did read about a potential fix where you can have a server alias whereby the alias name is exactly the same as the server name but that was some late reading and I would perhaps rule out the potential simpler issues first.
'Only he who wanders finds new paths'