Sftp setup

Hi all,

I need some help,whole process of setting up SFTP .
I know the process of invoking the sftp> prompt,but
I need how to know how to generate an sftp key,how to exchange a key,how to save a key at some location.What are all the proceesss we need to do while generating a key and trying to setup an automatic sftp between two servers for file exchange.Help me on this in and out please...

Thanks