How to Connect to Your VPS via SSH: Mobile, Windows, and Ubuntu
Step-by-step SSH connection guide for VPS from Android, iOS, Windows 10/11, and Ubuntu. Commands, apps, and troubleshooting included.
Right after provisioning a VPS, the control panel delivers three pieces of information: IP address, username (usually root), and initial password. The next step is opening an SSH session on the server — and the exact path depends on the device you have at hand.
This tutorial covers the three most common scenarios: connecting from a mobile phone (Android and iOS) when you need to fix something away from your desk, connecting from Windows 10/11 using the native OpenSSH client, and connecting from Ubuntu or any Linux distribution. The commands are the same in all cases — only the client changes.
Estimated time to complete: 10 to 15 minutes total, depending on how many devices you want to configure.
Prerequisites
A VPS already provisioned with SSH enabled on port 22 (default on any Ubuntu/Debian/AlmaLinux installation). Your access credentials should have been sent by email or be visible in the control panel.
The three values you will use repeatedly throughout this tutorial:
203.0.113.10 root 22 Replace 203.0.113.10 with your VPS’s actual IP in all commands below. If you have configured SSH on a different port (for security reasons, it is common to move to 2222 or 2200), adjust the -p parameter accordingly.
Connecting from Mobile (Android and iOS)
Using SSH from a phone is usually for emergencies: the site went down while you are away, you need to restart a service, or check a quick log. It is not comfortable for long work sessions, but it works well for targeted commands.
Android: Termius or Termux
Termius is the simplest option — graphical interface, saves hosts and keys, syncs across devices. Termux is more technical: it gives you a real Linux shell inside Android, and you use the native ssh command just like on any Linux system.
Install Termius from the Play Store. Open the app and tap New Host.
Fill in the fields:
- Alias: any name (e.g.,
my-vps) - Hostname: the VPS IP (203.0.113.10)
- Port: 22
- Username: root
- Password: the initial password sent by the panel
Save and tap the created host to connect.
Alternative via Termux: install Termux from F-Droid (the Play Store version is outdated). Open it and run:
pkg update && pkg install openssh
ssh [email protected]On the first connection, the client will ask you to confirm the server fingerprint — type yes and then enter the password.
iOS: Termius or Blink Shell
On iPhone and iPad, Termius works exactly like on Android — same interface, same sync. Blink Shell is paid but more robust, with support for mosh (sessions resilient to mobile connection drops).
Install Termius from the App Store. Tap Hosts > + and fill in the IP, port, username, and password as in step 01. Tap the host to open the session.
On first access, the app asks whether you want to save the fingerprint. Accept — this protects against man-in-the-middle attacks on future connections.
After testing the password connection, generate a key pair inside Termius (Keychain > Generate) and copy the public key to ~/.ssh/authorized_keys on the server. Passwords on mobile are vulnerable to shoulder surfing and virtual keyboard logging.
Connecting from Windows 10 and 11
Since Windows 10 build 1809, the OpenSSH client comes pre-installed and works directly in PowerShell or CMD — no need for PuTTY anymore. If you are on an older version or need graphical session management, PuTTY remains a valid option.
Native OpenSSH Client (recommended)
Open PowerShell or Windows Terminal (Start > type “powershell”). Run:
ssh [email protected]If using a custom port:
ssh -p 2222 [email protected]On the first connection, confirm the fingerprint with yes and enter the password when prompted.
If the ssh command returns “not recognized as a command”, the OpenSSH client is not installed. Enable it from PowerShell in administrator mode:
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0Close and reopen the terminal afterward.
Alternative: PuTTY
Download PuTTY from the official site (putty.org). Open the installer and on the main screen:
- Host Name (or IP address): 203.0.113.10
- Port: 22
- Connection type: SSH
Click Open. Accept the fingerprint on the first connection. Type root when prompted for login, then enter the password.
To save the session so you do not have to retype the IP every time, fill in a name under Saved Sessions before connecting and click Save.
Both in OpenSSH and in PuTTY, the password shows no asterisks or characters as you type — this is normal SSH behavior. Type carefully and press Enter.
Connecting from Ubuntu and Other Linux Distributions
On Linux, the SSH client is part of the default installation on virtually every modern distribution. There is nothing to install.
Open the terminal (Ctrl + Alt + T on Ubuntu) and run:
ssh [email protected]For a custom port:
ssh -p 2222 [email protected]If the openssh-client package is absent for some reason:
sudo apt update
sudo apt install -y openssh-clientGenerate an SSH key pair to eliminate the need for a password:
ssh-keygen -t ed25519 -C "my-laptop"Accept the default path (~/.ssh/id_ed25519) and optionally set a passphrase. Then copy the public key to the server:
ssh-copy-id [email protected]Enter the password one last time. From the next connection onward, login is automatic via key.
To simplify frequent connections, edit ~/.ssh/config:
nano ~/.ssh/configAdd:
Host my-vps
HostName 203.0.113.10
User root
Port 22
IdentityFile ~/.ssh/id_ed25519Now you connect with just ssh my-vps.
Verification
Regardless of the device used, once the connection is established you will see a prompt similar to:
root@hostini-vps:~#
The # at the end indicates you are logged in as root. Confirm by running:
whoami
uptime
The first command should return root and the second shows how long the server has been running, along with the load average. If both respond, your SSH connection is working.
Troubleshooting
Connection refused
The SSH service is not running on the server, or a firewall is blocking the port. If you have access to the VPS panel’s console, run:
sudo systemctl status ssh
sudo ufw status
If the service is stopped: sudo systemctl start ssh. If the firewall is blocking: sudo ufw allow 22/tcp.
Connection timed out
Packets are not reaching the server — usually an external firewall (from the provider), wrong IP, or the VPS is powered off. Confirm the IP in the panel and check that the VPS status shows “running”. On corporate networks, outbound port 22 may be blocked.
Permission denied (publickey,password)
The password is incorrect, the user does not exist, or the server requires key-based authentication and you are attempting password login. Check credentials in the panel. If you configured key login and disabled password authentication, you must use the -i parameter pointing to the correct private key.
Editing /etc/ssh/sshd_config to change the port or disable password authentication requires caution: always keep an existing SSH session open as a backup when restarting the service. If the new configuration breaks something, use the old session to revert.
Host key verification failed
The server’s fingerprint changed — this could be a legitimate VPS reinstallation or a man-in-the-middle attempt. If you know the server was reinstalled, remove the old entry:
ssh-keygen -R 203.0.113.10
Then reconnect and accept the new fingerprint.
Next Steps
Once SSH is working, a few logical steps to harden access:
- Create a non-root user with sudo and disable direct root login
- Switch from password authentication to SSH key-only authentication
- Move the SSH port from 22 to a high port (reduces bot noise)
- Configure
fail2banto ban IPs with repeated failed attempts - Enable two-factor authentication via Google Authenticator
If you are provisioning a new VPS for production, check out Hostini VPS — all plans come with a dedicated IPv4, a panel to reinstall the OS, and an emergency console in case you lock yourself out through a misconfigured SSH setup.
Frequently asked questions
Can I use the same SSH key pair on my phone, Windows, and Ubuntu?
You can, but it is not recommended. Best practice is to generate a separate key pair on each device and add all public keys to the server's `~/.ssh/authorized_keys`. That way, if one device is lost or compromised, you revoke only that key without invalidating the others.
Why does my SSH connection drop on its own after a few minutes of inactivity?
Intermediate routers and firewalls tear down idle TCP connections. To fix this, add `ServerAliveInterval 60` to your `~/.ssh/config` (client side) or `ClientAliveInterval 60` to `/etc/ssh/sshd_config` (server side). This sends a keep-alive packet every 60 seconds.
Is it safe to access SSH over public Wi-Fi from a phone?
Yes, SSH traffic is end-to-end encrypted — a public network cannot read the session content. The main risk is someone watching you type the password. Use SSH key authentication (not passwords) and enable the device's screen lock.
How do I copy files from my VPS to my computer over SSH?
Use `scp` or `rsync`. Example: `scp [email protected]:/etc/nginx/nginx.conf ./` downloads the file to the current directory. On Windows, `scp` is bundled with the native OpenSSH client. For a GUI, WinSCP is the PuTTY equivalent for file transfers.
Can I open multiple simultaneous SSH sessions to the same server?
Yes, `sshd` accepts multiple parallel connections by default (configurable via `MaxSessions` in sshd_config, typically 10). You can have one terminal for editing files, another tailing logs in real time, and another running commands, all at the same time.
What should I do if I forget the VPS root password?
Access the hosting control panel and use the emergency console or recovery mode option. From there, you can reset the password with `passwd root` or mount the filesystem to edit `/etc/shadow`. Some providers offer a direct password reset from the panel interface.