MD5 authentication must be configured with the same password on both BGP peers. Configuring MD5 authentication causes Cisco IOS to generate and check an MD5 digest for every segment on the TCP connection.
Cisco currently only supports MD5 authentication, and only requires a single line of configuration to enable neighbor authentication. MD5 authentication is enabled using the following command:
neighbor 18.104.22.168 password cisco
where "cisco" is the password, which must be identical on both ends of the peering.
For information on configuring authentication on an already established BGP session, take a look at BGP configuring authentication on an established BGP session.