Connecting using ssh

We have 2 different servers say A and B and I want to check the log file of 2 servers simultaneously.
If I am logged into server A how can I connect to server B.
I have used ssh username@B.But it is asking password. How can I give the password on ssh.
Or is there any other utility for this.

You havent searched much the forums have you? because loads of threads exist here on the subject...
e.g.

You need for a passwdless connection using ssh to exchange your public keys between the boxes for that account...

So search the forums to see how it is done if the above thread is not sufficent.

You can set up passwordless ssh login as described on this site.