ALL SYSTEMS OPERATIONALUPTIME 99.97%FLEET 18/18IN-MUM · US-LAX · EU-FSN EST. 2003 · +91 11 4998 4038

KNOWLEDGEBASE · SERVERS DEDICATED & VPS

Setting up public key ssh authentication

Last updated 2020-04-02

Setting up public key ssh authentication
Your mirror server will need to use public key ssh authentication to talk to your production server. To set this up, you will need to ssh into your mirror server and enter the following commands:

  1. Create your public and private key pair by typing: ssh-keygen -t dsa and press Enter.
  2. The key generator will ask you where you want to save your key. Press Enter to accept the default.
  3. Next, the generator will prompt you to enter a passphrase. Press Enter without entering a passphrase. (You must leave this blank to allow for the automated tasks)
  4. Finally, you will need to copy your public key to your production server. Do this by entering the following command (you will need to enter your password just this one time after you press Enter):

    • cat ~/.ssh/id_dsa.pub | ssh user@serverIP -p sshCustomPort "cat >> ~/.ssh/authorized_keys"
      user = the username of your production server
      serverIP = the IP address of your production server
      sshCustomPort = the port other than 22 that ssh listens to
Finally, you can test your setup by entering: ssh user@serverIP. If you've set this up correctly, you should not have to enter any login details.

← All knowledgebase articles

Tell us what has to stay up.

A short conversation with an engineer. No quote-bot, no callback queue. We'll tell you honestly if we're not the right fit.