This is how to quickly deploy a SSH public key to a remote linux server. Afterwards automation tools like ansible, chef or puppet should be used.
AWS is a good opportunity to easily setup your infrastructure. A SSH key can be managed using the AWS Key-Management.
But other (less expensive) cloud provider send out initial SSH passwords. Here is how to avoid too many manual steps.
This will grab the first public key (*.pub) found in the ~/.ssh directory and transfer it to the remote host.
cat ~/.ssh/id_rsa.pub | ssh <user>@<hostname> 'umask 0077; mkdir -p .ssh; cat >> .ssh/authorized_keys && echo "Public key copied"'