How can we help?
< All Topics

Using Pre-Generated SSH Keys and Disabling Password Authentication for Secure Access to ServerStadium’s Cloud Instances

Secure Shell (SSH) keys offer a more secure method of logging into a server than using a password alone. ServerStadium’s cloud instances are configured with pre-generated SSH keys for this purpose. This tutorial will guide you on using these SSH keys for secure access and disabling password authentication for your ServerStadium cloud instance.

For more tutorials and guides, make sure to visit our Knowledge Base.

Step 1: Register Your Account

If you haven’t already, you’ll need to create an account on our Registration Page. Once registered, you’ll have access to your personal Cloud Dashboard.

Step 2: Add Your Cloud Instance

From your Cloud Dashboard, click the ‘Add VM’ button. Choose a cloud instance that suits your needs and budget. For more detailed information about our offerings, you can visit our Pricing Page.

Step 3: Retrieve Your SSH Key

Once your cloud instance is created, you can retrieve the pre-generated SSH key from your Cloud Dashboard. Save this key to a secure location on your local machine, typically in the ~/.ssh/ directory.

Remember to set the correct permissions for your SSH key file with the following command:

chmod 600 ~/.ssh/your_ssh_key

Replace “your_ssh_key” with the filename of your SSH key.

Step 4: Disable Password Authentication

To enhance security, you can disable password authentication and allow only SSH key authentication. Log into your ServerStadium cloud instance and edit the SSH configuration file:

sudo nano /etc/ssh/sshd_config

Find the line that says PasswordAuthentication and change it to no. If the line is commented out, remove the # at the start of the line. Save and exit the file.

After making this change, you must restart the SSH service for the changes to take effect:

sudo systemctl restart ssh

Step 5: Login Using SSH Keys

Finally, log into your ServerStadium cloud instance using the SSH key with the following command:

ssh -i ~/.ssh/your_ssh_key your_username@your_server_IP_address

Replace “your_ssh_key” with your SSH key filename, “your_username” with your actual username, and “your_server_IP_address” with the IP address of your ServerStadium cloud instance.


Congratulations! You’ve successfully used pre-generated SSH keys for secure access and disabled password authentication on your ServerStadium cloud instance. Now, you can log into your instance securely without needing a password.

Visit our Knowledge Base for more tutorials and guides.

Table of Contents