Skip to main content
Support
0
Contact us
Nederlands
Deutsch
Español
Dedicated serversFlexible VPSCloud TechnologyColocationChallenges in ITSectorsCareers
Cloud Compute

With Cloud Compute, you have access anytime and anywhere to a portal through which you can configure your entire IT environment from wherever you are in the world.

Cloud Storage

Reliable access to your files, infrastructure, and applications at all times – with no interruptions or delays. At Worldstream, we offer a variety of storage solutions.

Flexible cloud icon
Flexible cloud
Private cloud icon
Private cloud
Bare metal icon
Bare Metal Compute
Hollow cube icon
Object storage
Hollow cube icon
File storage
Block storage icon
Block storage
Backup storage icon
Backup storage
Need support?

With experienced engineers and an average response time track record on 7 minutes, you can expect a solid technical support solution in next to no time.

All Servers

Choose your Dedicated Server now. Custom or Instant Delivery. Powerhouse servers built for your use case.

Use Cases

Whatever your use case, we’re here to help you find the ideal solution.

Deal servers icon
Deals
AMD servers icon
AMD Processors
AI servers icon
Intel Processors
Hollow cube icon
Virtualisation, Containerisation and Orchestration
Hollow cube icon
Websites and Applications
Hollow cube icon
Gaming and Streaming Infrastructure

24/7/365 support with an average response time of just 7 minutes. Thanks to our own data centers, our engineers can go directly to your server for fast, hands-on assistance. Email or call us anytime.

Smart outsourcing

Some IT creates added value, while other types are supportive. Use that as a starting point for outsourcing.

Cost Efficiency

Complete IT packages may seem like the safe option, but when you consider the costs, other choices often make more sense.

IT flexibility & control

Outsourcing doesn’t mean losing control; it actually provides more flexibility and control.

Cloud repatriation

The cloud is not a final destination: You should continuously evaluate and adjust your cloud environment as needs evolve.

Financial services
Logistics & Transportation
Retail & E-commerce
Media & Entertainment
Tech & Software Development
Security
Managed Service Providers
Need support?

With experienced engineers and an average response time track record on 7 minutes, you can expect a solid technical support solution in next to no time.

Chat with usContact us
About WorldstreamAbout the technologyCasesKnowledge base
About usMeet the teamJobsBecome a resellerCertificationsOur data centersOur networkDDoS ProtectionAMD EPYC serversTechnology PartnersOperating SystemsAll casesEasyTerraDutch Drone CompanyPerfGridArticlesFAQNews and BlogsProducts and Services
Contact us

Call +31 (0) 174 – 712 117

Industriestraat 53, Naaldwijk

Nederlands
Deutsch
Español
0
Dedicated serversFlexible VPSCloud TechnologyColocationChallenges in ITSectorsCareersAbout WorldstreamAbout the technologyCasesKnowledge baseMy Worldstream
Contact
Support
NederlandsDeutschEspañol
  1. HomeHome
  2. Knowledge Base
  3. Linux
  4. Creating an SSH key pair

Creating an SSH key pair

Applies to Dedicated servers, Flexible VPS (Linux)Audience Server administratorsLast reviewed September 2026

Quick answer

Run ssh-keygen -t ed25519 to generate a key pair, then copy the public key to the server's ~/.ssh/authorized_keys file. Use ssh-keygen -t rsa -b 4096 instead if the system doesn't support ed25519.

An SSH key pair consists of a private key, which stays on your own machine and is never shared, and a public key, which you place on the server. Logging in with a key pair is both more convenient and more secure than a password: there's nothing to brute-force, and combined with a passphrase on the private key, it works like a form of two-factor authentication.

Generate a key pair

1

Run ssh-keygen

On Linux, macOS, or Windows with the built-in OpenSSH client (or WSL), open a terminal on your own machine and run:

ssh-keygen -t ed25519

Ed25519 is the current recommended key type: it's fast, and the keys are short and secure at a fixed size, so there's no bit-length to choose. If you're connecting to an older system that doesn't support ed25519, generate an RSA key with a 4096-bit length instead:

ssh-keygen -t rsa -b 4096

Accept the default file location, and set a passphrase when prompted. The passphrase protects the private key itself; you'll still need it each time you use the key, unless your system caches it in an agent.

Add the public key to your server

1

Copy the key with ssh-copy-id

If ssh-copy-id is available on your machine, this is the simplest way to install your public key on the server:

ssh-copy-id user@your-server-ip
2

Or add it manually

If ssh-copy-id isn't available, create the .ssh directory and authorized_keys file on the server yourself, then paste in the contents of your public key file (the .pub file, never the private key):

mkdir -p ~/.ssh
chmod 700 ~/.ssh
touch ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
nano ~/.ssh/authorized_keys

For Flexible VPS, you can also add a public key under Flexible VPS → Settings in Portal, manually or imported from GitHub or GitLab, so it's already on the server when it's created.

Harden SSH once your key works

1

Disable password authentication and root login

Edit /etc/ssh/sshd_config and set:

PasswordAuthentication no
PermitRootLogin no

Then restart the SSH service:

sudo systemctl restart sshd
2

Test before you disconnect

Open a new terminal window and log in with the key before closing your existing session:

ssh user@your-server-ip

Only close the original session once the new one connects successfully. If something's wrong, the existing session lets you fix it without being locked out.

Use one key pair per person rather than sharing a single key across your team, so access can be revoked for one person without affecting everyone else. See also How to improve your SSH security and How to change the SSH port for further hardening steps.

Related articles

  • How to improve your SSH security
  • How to change the SSH port
  • How to add or remove a user on your Linux server
Was this article helpful?

Solid IT. No Surprises

Sparring partner for IT maturity
Eliminating barriers so you can run
Predictable and transparant costs

Contact

  • Industriestraat 53, Naaldwijk
  • Payment Methods
  • Abuse
  • Developers Resources
  • Network Operations Center
  • About us
  • Meet the team
  • Jobs
  • Become a reseller
  • Certifications
  • Our data centers
  • Our network
  • DDoS Protection
  • AMD EPYC servers
  • Technology Partners
  • Operating Systems
  • Overview
  • FAQ
  • Cases
  • News & Blogs
  • Use Cases
Nederlands
Deutsch
Español
Nederlands
Deutsch
Español
  • Legal
  • Disclosure