LightYear
/Docs
DocsGetting StartedConnect to Your Server via SSH

Connect to Your Server via SSH

Learn how to connect to a Linux server using SSH from macOS, Linux, and Windows clients.

beginner
6 min read
LightYear Docs Team
Updated April 24, 2026
sshconnectlinuxterminal
Ready to get started?

SSH (Secure Shell) is the standard protocol for securely connecting to remote Linux servers. This guide covers connecting from macOS, Linux, and Windows.

Prerequisites

  • A running LightYear server with a public IP address
  • An SSH key pair added to the server during deployment (or root password if no key was added)

Connect from macOS or Linux

Open your terminal and run:

>_BASH
$ssh root@YOUR_SERVER_IP

If you use a non-default key file location, specify it with the -i flag:

>_BASH
$ssh -i ~/.ssh/my_custom_key root@YOUR_SERVER_IP

On first connection you will see a host key fingerprint prompt:

OUTPUT
The authenticity of host '45.77.x.x (45.77.x.x)' can't be established.
ED25519 key fingerprint is SHA256:abc123xyz...
Are you sure you want to continue connecting (yes/no/[fingerprint])?

Type yes and press Enter. The fingerprint is saved to ~/.ssh/known_hosts for future connections.

Connect from Windows

Windows 10 1809+ and Windows 11 include a built-in OpenSSH client. Open Windows Terminal or PowerShell and run:

>_BASH
$ssh root@YOUR_SERVER_IP

Option B — PuTTY

  1. Download PuTTY and open it.
  2. Enter your server IP in the Host Name field.
  3. Set Port to 22 and Connection type to SSH.
  4. Under Connection → SSH → Auth → Credentials, browse to your .ppk private key file.
  5. Click Open.

[!TIP] To convert an OpenSSH key (id_ed25519) to PuTTY format (.ppk), use PuTTYgen: File → Load Private Key → Save Private Key.

Create an SSH Config File for Convenience

Instead of typing the full command every time, add an entry to ~/.ssh/config:

INI
Host myserver
    HostName 45.77.x.x
    User root
    IdentityFile ~/.ssh/id_ed25519
    ServerAliveInterval 60

Now you can connect with just:

>_BASH
$ssh myserver

Troubleshooting Connection Issues

ErrorLikely CauseFix
Connection refusedSSH daemon not running or port blockedCheck firewall rules allow port 22
Permission denied (publickey)Wrong key or key not added to serverVerify key in ~/.ssh/authorized_keys
Host key verification failedServer IP changed or re-deployedRun ssh-keygen -R YOUR_SERVER_IP
Connection timed outNetwork/firewall blocking port 22Check LightYear firewall group rules

[!WARNING] If you see Host key verification failed, do not bypass it blindly. Verify the server IP is correct before removing the old host key entry.

Was this article helpful?

Your cookie choices for this website

This site uses cookies and related technologies, as described in our privacy policy, for purposes that may include site operation, analytics, and enhanced user experience. You may choose to consent to our use of these technologies, or manage your own preferences. Cookie policy