When you are setting up the infrastructure, getting the application running can be the primary concern. Making the application function correctly without handling the security needs in the infrastructure can lead to much devastating consequences. There are some basic security practices which you can make use of so that you can ensure better security of the server.
SSH keys are the cryptographic keys which can be made used for authenticating SSH server as alternative to the logins that are based on password. The public and private keys are paired before authentication. Private keys are kept secret while public keys are shared with everyone.
Firewalls is another way for ensuring security of the server. Firewalls can help in controlling services which are exposed to network and can restrict the access to the server. Private networks can also implement better security to the servers. Private networks are available only to certain users or servers. VPN is also a good means for creating secure connections between the remote computers and then present connection.
It is also good to make use of some file auditing and also intrusion detection systems so that you can compare current system against record of files and also the file characteristics of the system when that is of good state.