Use encryption on the password and/or connection string and store the encrypted password/connection string in a config file of some sort. Then use my answer here to add the connection string value to the NHibernate Configuration object after decrypting it:
How to load application settings to NHibernate.Cfg.Configuration object?How to load application settings to NHibernate.Cfg.Configuration object?
Like:
nHibernateConfiguration.SetProperty(
NHibernate.Cfg.Environment.ConnectionString,
Util.Decrypt(encryptedConnectionString));