This guide explains how to securely connect to a remote server using SSH. Follow these steps to set up an SSH connection from your local machine to your server, ensuring secure access for system management and file transfers..
10 min
Edited:15-09-2024
Secure Shell (SSH) is a widely used protocol that allows you to securely connect to a remote server over an encrypted connection. It is an essential tool for managing servers and transferring files. This guide will show you how to connect to a server using SSH from a Linux, macOS, or Windows system.
What you need as prerequisites
1 - SSH installed on the server (most Linux distros have SSH pre-installed)
2 - Public IP address or hostname of the server
3 - A user with SSH access on the server
4 - SSH client on your local machine
In your local machine, you should have an ssh client:
Linux/macOS: SSH is pre-installed.
Windows: You can use Windows PowerShell or an SSH client like PuTTY.
In SSH you will need the IP address of the server or the domain name and the Username that you will use to log in. If you have a VPS hosted on one of the hosting providers, you most likely find those details in your control panel, as most of the providers preconfigure the servers with such detail
For Windows, you can either open PowerShell or use PuTTY if you prefer a graphical SSH client
In the terminal or PowerShell, use the following command to connect to your server:
1. ssh username@server_ip
For example, you will see something similar to this command
1. ssh [email protected]
After entering the command you will be asked to confirm with “yes” or “no”, type yes to continue
You will then be prompted for your password. Enter the password for the remote user (it won't display as you type for security reasons), then press Enter.
And that's it, you are now connected to the server
Open PuTTY after installing it
In the Host Name (or IP address) field, enter your server's IP address or hostname
Ensure the Port is set to 22 (the default SSH port).
Click Open to initiate the connection.
By following this guide, you’ve learned how to connect to a remote server securely using SSH, whether you're using Linux, macOS, or Windows. With SSH, you can manage your server from anywhere with a secure connection. SSH keys provide an even more secure and convenient method of connecting, and tools like PuTTY offer an alternative for users who prefer a graphical interface.
What's next:
14-10-2024
This article offers a detailed guide on installing and configuring IPTables on an Ubuntu VPS. IPTables is a powerful firewall tool that helps secure your server by controlling inbound and outbound traffic. Learn how to set up rules for traffic filtering, configure basic security policies, and apply custom rules to protect your VPS.
IPtables
security
12 min
This article offers a comprehensive guide on installing and configuring ModSecurity, a powerful web application firewall (WAF), on an Ubuntu VPS. Learn how to secure your server by filtering and monitoring HTTP requests, set up ModSecurity with Nginx or Apache, and apply rules to protect against common web attacks.
Modsecurity
security
10 min
14-10-2024
This article provides a comprehensive guide on installing and configuring PHP-FPM (FastCGI Process Manager) on an Ubuntu VPS. Learn how to optimize PHP performance for your web applications by configuring PHP-FPM with Nginx or Apache, managing pools, and fine-tuning settings for efficient processing of PHP scripts.
PHP-FPM
speed
optimise
12 min