The configuration you need is the same as with connecting to remote hosts.
Lets say the you are connected as UserA and need to switch to User B without entering the password.
The basic steps are:
Generate ssh key as UserA.
Copy the ssh key to /home/UserB/.ssh/
connect using "ssh UserB@localhost".
for more detailed info see: http://www.sshkeychain.org/mirrors/S...s-HOWTO-4.html