want to do login to remote server with out password

Hi All
I am new to Unix.
I have write srcipt which will automate the follwing tasks
login to F-Secure server over ssh
copy file from my local server to that server.
Remote server wants to login with out password(ssh-keygen)
I am not getting how to write that scirpt
Please help me
Yesterday i tried by simply firing commands
ssh-keygen -t rsa
cat id_rsa.pub | ssh charter@193.64.205.197 `cat >> .ssh/authorized_keys`
but got errror
bash: .ssh/authorized_keys: No such file or directory

Pseudo-terminal will not be allocated because stdin is not a terminal.

Unable to find an authentication method

Plase help me