{"id":8364,"date":"2026-11-27T04:30:00","date_gmt":"2026-11-27T04:30:00","guid":{"rendered":"https:\/\/cloudvpshosts.com\/kb\/?p=8364"},"modified":"2026-11-26T14:31:33","modified_gmt":"2026-11-26T14:31:33","slug":"how-to-connect-to-a-linux-vps-with-ssh","status":"publish","type":"post","link":"https:\/\/cloudvpshosts.com\/kb\/how-to-connect-to-a-linux-vps-with-ssh\/","title":{"rendered":"How to Connect to a Linux VPS with SSH (Windows, macOS and Linux)"},"content":{"rendered":"<p>To connect to a Linux VPS with SSH, open a terminal and run <code>ssh root@YOUR_SERVER_IP<\/code>, type <code>yes<\/code> to accept the host key the first time, then enter the root password from your welcome email. Windows 10 and 11, macOS and every Linux desktop ship with an SSH client, so there is nothing to install.<\/p>\n<p>This guide covers the exact steps on each system, what to check if the connection fails, and what to do in the first few minutes after you log in.<\/p>\n<h2>What do you need before you connect?<\/h2>\n<p>You need three things, all of which are in the welcome email sent when your server is provisioned:<\/p>\n<ul>\n<li><strong>Server IP address<\/strong>, for example 203.0.113.25<\/li>\n<li><strong>Username<\/strong>, usually <code>root<\/code><\/li>\n<li><strong>Password<\/strong> or the SSH key you added at checkout<\/li>\n<\/ul>\n<p>SSH listens on port 22 by default. If you or a script changed the port, you will need that number too.<\/p>\n<h2>How do I connect from Windows 10 or 11?<\/h2>\n<p>Windows has a built-in OpenSSH client. Open <strong>Windows Terminal<\/strong> or <strong>PowerShell<\/strong> and run:<\/p>\n<pre><code>ssh root@203.0.113.25<\/code><\/pre>\n<p>The first time, Windows shows the server&#8217;s fingerprint and asks if you want to continue. Type <code>yes<\/code> and press Enter, then paste your password. The cursor won&#8217;t move while you type the password. That is normal.<\/p>\n<p>If you prefer a graphical tool, PuTTY still works well. Put the IP in <em>Host Name<\/em>, keep port 22, choose SSH and click <em>Open<\/em>.<\/p>\n<h2>How do I connect from macOS or Linux?<\/h2>\n<p>Open <strong>Terminal<\/strong> and use the same command:<\/p>\n<pre><code>ssh root@203.0.113.25<\/code><\/pre>\n<p>If SSH runs on a custom port, add <code>-p<\/code>:<\/p>\n<pre><code>ssh -p 2222 root@203.0.113.25<\/code><\/pre>\n<p>To skip typing the IP every time, add an entry to <code>~\/.ssh\/config<\/code>:<\/p>\n<pre><code>Host myvps\n    HostName 203.0.113.25\n    User root\n    Port 22<\/code><\/pre>\n<p>After that, <code>ssh myvps<\/code> is enough.<\/p>\n<h2>Why is my SSH connection failing?<\/h2>\n<table>\n<thead>\n<tr>\n<th>Error<\/th>\n<th>Likely cause<\/th>\n<th>Fix<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Connection timed out<\/td>\n<td>Wrong IP, server still booting, or a firewall blocking port 22<\/td>\n<td>Check the IP, wait a few minutes after provisioning, review firewall rules<\/td>\n<\/tr>\n<tr>\n<td>Connection refused<\/td>\n<td>SSH service stopped or listening on another port<\/td>\n<td>Use the server console, or ask support, and run <code>systemctl status ssh<\/code><\/td>\n<\/tr>\n<tr>\n<td>Permission denied<\/td>\n<td>Wrong password or key, or root login disabled<\/td>\n<td>Copy the password again without spaces, or reset it from the panel<\/td>\n<\/tr>\n<tr>\n<td>REMOTE HOST IDENTIFICATION HAS CHANGED<\/td>\n<td>The server was reinstalled and has a new host key<\/td>\n<td>Run <code>ssh-keygen -R 203.0.113.25<\/code> and connect again<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The host key warning is worth a second look. After a reinstall it is expected. If you didn&#8217;t reinstall anything, stop and check with support before you accept the new key.<\/p>\n<h2>What should I do right after logging in?<\/h2>\n<p>Three quick jobs make a fresh server much safer:<\/p>\n<ol>\n<li>Update packages: <code>apt update &amp;&amp; apt upgrade -y<\/code> on Ubuntu or Debian, <code>dnf upgrade -y<\/code> on AlmaLinux or Rocky.<\/li>\n<li>Change the root password with <code>passwd<\/code>, or better, switch to key-only login. Our guide on <a href=\"https:\/\/cloudvpshosts.com\/kb\/setting-up-an-ssh-key\/\">setting up an SSH key<\/a> walks through it.<\/li>\n<li>Create a normal user with sudo rights and work from that account. The <a href=\"https:\/\/cloudvpshosts.com\/kb\/initial-server-setup-with-ubuntu\/\">initial server setup guide for Ubuntu<\/a> has the commands.<\/li>\n<\/ol>\n<p>If you don&#8217;t have a server yet, a <a href=\"https:\/\/cloudvpshosts.com\/linux-vps.php\">KVM Linux VPS<\/a> with Ubuntu, Debian, AlmaLinux or Rocky is usually ready within 5 to 10 minutes of payment, with full root SSH access.<\/p>\n<h2>Frequently asked questions<\/h2>\n<h3>Can I use SSH from my phone?<\/h3>\n<p>Yes. Apps such as Termius on Android and iOS support passwords and keys. It is handy for restarting a service, but a laptop is more comfortable for real work.<\/p>\n<h3>Is SSH safe over public Wi-Fi?<\/h3>\n<p>The SSH session itself is encrypted. The bigger risk is a weak root password, so move to key login and turn off password authentication once your key works.<\/p>\n<h3>What is the difference between SSH and SFTP?<\/h3>\n<p>SFTP runs over the same SSH connection and is used for file transfers. Tools like FileZilla or WinSCP accept the same IP, username and password.<\/p>\n<h3>I lost my root password. What now?<\/h3>\n<p>Open the server in your client area and use the password reset option if it is shown, or reinstall if the server holds nothing important. If neither is available, open a support ticket.<\/p>\n<h2>Next step: secure your new server<\/h2>\n<p>Once you can log in, set up key-based login and a firewall before you install anything else. Need a server to practise on? Compare our <a href=\"https:\/\/cloudvpshosts.com\/linux-vps.php\">Linux VPS plans<\/a> or the faster <a href=\"https:\/\/cloudvpshosts.com\/ssd-vps.php\">SSD VPS<\/a> range.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Step by step: open a terminal, run ssh root@your-ip, accept the host key and log in. Works from Windows 10\/11, macOS and Linux.<\/p>\n","protected":false},"author":1,"featured_media":8387,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_yoast_wpseo_title":"How to Connect to a Linux VPS with SSH | Cloud VPS Hosts","_yoast_wpseo_metadesc":"Connect to your Linux VPS over SSH from Windows, macOS or Linux. Exact commands, first login steps and fixes for common SSH errors.","_yoast_wpseo_focuskw":"connect to linux vps ssh","rank_math_title":"","rank_math_description":"","rank_math_focus_keyword":""},"categories":[69],"tags":[262,246,252],"class_list":["post-8364","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-getting-started","tag-linux-vps","tag-ssh"],"_links":{"self":[{"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/posts\/8364","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/comments?post=8364"}],"version-history":[{"count":2,"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/posts\/8364\/revisions"}],"predecessor-version":[{"id":8432,"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/posts\/8364\/revisions\/8432"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/media\/8387"}],"wp:attachment":[{"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/media?parent=8364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/categories?post=8364"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudvpshosts.com\/kb\/wp-json\/wp\/v2\/tags?post=8364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}