client-machine% ssh-keygen -t rsa client-machine% scp ~/.ssh/id_rsa.pub user@target-machine:~/.ssh/authorized_keys2
client-machine% cat ~/.ssh/id_rsa.pub | ssh user@target-machine \ 'cat >> .ssh/authorized_keys'
client-machine% ssh user@target-machine client-machine% scp file user@target-machine:~/file