Open SSH server can allow you to connect to your remote server terminal and make any configuration you want. Once you gain access to your server’s remote terminal, you will be able to install any script on it with ease.
In this guide, you learn how to install Open SSH server in a few simple steps:
Update & Upgrade the System
Updating your Linux system regularly is a crucial practice for maintaining a secure, stable, and well-performing environment. Installing scripts on an outdated system can cause unnecessary risks and potential problems. This following command will update and upgrade the system
sudo apt update && sudo apt upgrade -y
RECOMMENDED READING: How to download and install Ubuntu Linux on a Laptop
Install Open SSH Server
Open SSH server is free and it’s the default SSH implementation for Ubuntu: The following command can install Open SSH:
sudo apt install openssh-server
Check Open SSH Server Status
After installing the Open SSH server, you need to check if it’s running. You can use the following command to check the status of the Open SSH server:
sudo systemctl status ssh
If OpenSSH is running, you will be able to see something like this on your terminal:
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2023-11-14 10:30:00 UTC; 3 days ago
Main PID: 1234 (sshd)
Tasks: 1 (limit: 4915)
Memory: 2.1M
CGroup: /system.slice/ssh.service
└─1234 /usr/sbin/sshd -D
RECOMMENDED READING: How to host a Laravel application on Ubuntu using Apache
Start Open SSH Server
If Open SSH Server is not running, you can start it by running this command:
sudo systemctl start ssh
Enable Open SSH Server
Enabling Open SSH Server means that the SSH service will automatically start upon the system reboot. You can run the following command:
sudo systemctl enable ssh
Allow Open SSH Server through the Firewall
By default, Open SSH uses port 22 for connection. This means that whenever you need to remotely connect to your server terminal, port 22 has to be opened on the remote server. You can use the UFW firewall to open port 22 to allow SSH connections using the following command:
sudo ufw allow ssh
RECOMMENDED READING: How to install and configure UFW firewall on Ubuntu Linux
How to use an SSH Client to Connect?
An SSH client is a software application that’s installed on your local computer and that allows you to connect to a remote SSH server securely. To connect to use an SSH Client to connect to the server remotely, you need to have the following:
RECOMMENDED READING: How to Install WordPress on a VPS Server using Cloudron?
Server IP address
This is the public IP address attached to the server on which you installed Open SSH server. The IP address serves as the host address for SSH connection Almost every remote server is assigned a public IP address. You can also find your Server’s Public IP address by running the following command:
curl ifconfig.me
This will send a request to the “ifconfig.me” service, and you will receive your public IP address as a response.
Username
This is the account name associated with a user on a remote server or system. The actual username you use will depend on the configuration of the remote server and the user account you have on that server. But if you have administrative access to the server, then your username is likely to be root or something else depending on how you set it up.
RECOMMENDED READING: How to easily Create and Add Users in Linux
Password
Your username is always associated with the password. When connecting to the remote server using SSH, you will use this very password to log in.
Using the Commandline to connect to the SSH Server
If you already have Open SSH Client installed on your Windows, you will be able to use the default Windows terminal to establish an SSH connection to the remote server.
To confirm if Open SSH client is installed on your Windows, you need to open your Windows terminal and type in ssh then hit Enter. If it’s installed, you will be able to see something like this on your terminal:
RECOMMENDED READING: How to install an SSL Certificate on Ant Media Server
Install Open SSH Client on Windows
If you don’t have Open SSH client on Windows, then you need to install it. Here are the steps to follow:
1. Open Settings
Click on the settings section as seen in the image below:
2. select Apps,
You need to click on the apps section as seen in the image below:
3. Then select Optional Features.
You will need to click on Optional Features as seen below
4. Click Add features
You need to click Add Features and then look for the Open SSH client feature. Click on it to install. See the image below:
SSH connection Syntax on the terminal
When you have Open SSH client installed, you need to open your Windows terminal and use the following syntax to connect to your server:
ssh username@IP-address
All you have to do is to replace the username with your actual SSH username and IP-address with the actual IP address of your server then hit Enter.
You will be prompted to type your SSH password. Please note while typing your password, it won’t be visible on the terminal screen. The best way is to copy and paste
RECOMMENDED READING: How to Point a Domain Name from Namecheap to Contabo VPS
Using Tabby SSH Client to connect to the Server
Tabby is one of the free SSH client software out there. You can install it on your system by downloading it from their website here
If you have Tabby installed, follow the following steps to establish an SSH connection:
Click the settings icon
When Tabby is open, you need to click on the settings icon
Profiles and connections
After you’ve clicked on the settings icon, you need to find the profiles and connections section as seen in the image below:
You will have to click on the Profiles and Connections, and you will be taken to this section as seen in the image below:
Add New Profile
You will need to click New Profile and select SSH connection as seen in the image below:
Add SSH Login Credentials
Under this step, you will need to add your SSH credentials as seen in the image below:
From the above image, here are the things you need to fill in:
- Name: This is any name you’re going to assign to this particular SSH connection on your local Machine. This is useful if you’re planning to have various SSH connections to different servers. So, assigning each connection a name would be a good idea for easy identification.
- Host: This is the IP address of the remote server on which you installed the Open SSH server.
- Username: This is the username you need to remotely log in to the server using SSH
- Password: To be able to set the password, you will need to click on the forget button if necessary
- Save: Once you’ve filled in the credentials, make sure you click the save button. This means that your SSH connection will be saved and you won’t be required to keep setting up the login details to connect
More related articles to explore
- How to host a Laravel application on Ubuntu using Apache
- How can I update Ant Media Server on Ubuntu?
- How to use Alibaba Cloud Free credit to Set up Ubuntu server
- How to install and configure UFW firewall on Ubuntu Linux
- How to set up Nginx RTMP Server on Ubuntu to Live stream videos
- How can I create FTP User Directory in Ubuntu?
- Step-by-Step Guide to Installing FTP on Ubuntu Server
- How to deploy WordPress on a Ubuntu LAMP Server
- How to deploy a MySQL Server on Ubuntu
- What is the easiest way to install Apache Server on Ubuntu?
- How to configure iptables to secure Apache server on Ubuntu
- How to enable root user on AWS ec2 Ubuntu Linux instance
- How to Install OpenVPN Server on Ubuntu
- How to install a Graphical User Interface on Ubuntu Server
- How to install Ant Media Server on Ubuntu Linux Server
- How to Dual Boot Kali Linux and Windows on a Laptop
- How to Install WordPress on a VPS Server using Cloudron?
- How to use the apt command in Linux | Syntaxes & Examples
- Is deploying and managing a VPS server hard?