One of the most important ways to access Linux is through SSH. With this remote user command line tool, you can do everything from installing software to configuring Linux as a web server. SSH can save you time, make you more productive, and help you take advantage of your Linux distro.
But how do you configure SSH, both on the client and server side? Learn how to install and configure SSH software from both ends and manage a remote computer on your Linux computer.
What is SSH?
SSH means Sother safety deficiencies shell and allow you to remotely control a Linux computer or server from another device. It works on LANs and the Internet, which means it can be used to manage a Linux-based media server in the house or a Linux web server on a different continent.
SSH does not give you access to the desktop environment of the remote computer, but it allows you to use the terminal. Once connected to a remote computer, you can use it as if it were in front of you. Just make sure you have administrator access.
Note that other remote access solutions are available for Linux. For example, Ubuntu users can trust VNC compatible remote desktop tool Remmina
Ubuntu Remote Desktop: Easy, built-in, VNC compatible
To use SSH, you need to make sure that the remote computer (server) is configured with SSH. In addition, the local device (client) needs to install the SSH application.
Installing and configuring SSH for the client is easy. In some cases, you don’t even need extra software:
- Try connecting to Linux via SSH from your iPhone and iPad iTerminal ($ 4.99)
- If you’re using Android for SSH, give it a try JuiceSSH (Free)
SSH is not installed on Linux? To update, upgrade and then install and install:
sudo apt update && sudo apt upgrade sudo apt install openssh-client
Are you used to using SSH on Windows, but have you switched to the Linux desktop? You may forget the PuTTY desktop SSH app with its easy mouse interface. Fortunately, it can be installed on a Linux desktop:
sudo apt install putty
Once the SSH client software is installed, you are ready to connect to your remote computer or server.
As a general rule, for all desktop and mobile clients, all you need is an IP address or host name and the appropriate login information. Although the appearance of applications may vary and the port name may need to be entered manually, SSH clients are usually inseparable.
installation and configuration of the server-side
Before creating the connection, install the server-side software, SSH access for hosting. This requires someone present to install or enable SSH, and you may already be present to do this – otherwise a coworker or support planner at the end of the server will configure SSH.
Note that if you are using a web hosting package, SSH should be enabled by default. Contact your web host to configure SSH, if not.
If SSH is not enabled on the remote computer or server, install it
sudo apt install openssh-server
Check this action
sudo systemctl status ssh
The command should legitimize the active response.
In some cases, the Ubuntu firewall ufw can block SSH. Make sure this does not happen
sudo ufw allow ssh
In some cases, you may also need to enable SSH on the remote device. This is a safety precaution that can be corrected by using
sudo systemctl enable ssh
Other options are available (
disable) To configure the SSH service.
Specify the IP address
To connect to a remote device via SSH, you need to know the IP address of the device. You have two easy ways to find this:
- Execute the end command
- Check the router
Log in and display the remote system IP address
This returns the IP address of the device, so take that into account. In older versions of Linux
ifconfig may provide better results.
You can also check the router to see the connected devices. A Linux computer or server is listed, typically by operating system or device name. This should be easy to identify.
To display the public IP address, log in to the server and open whatsmyip.org.
The IP address used should be appropriate for the connection. So, if the device is on the same network as the client, use the local IP address. Use a public IP address for Internet connections. If the computer is on another network, make sure port 22 is forwarded to the computer.
Connects to Linux via SSH
In addition to the correct IP address, you should have a username and password to access the remote machine.
Use the command line SSH tools
Remember to switch user name with the real user name and the IP address of the remote device REMOTE.IP.ADDRESS.HERE. Hit Come in, and you will be asked for a password.
With the correct password, you will receive a working terminal prompt – you are now logged on to the remote computer.
Do you use a desktop SSH client such as PuTTY?
Enter the host Name or IP address, Choose SSH connection type then Open. When prompted for a username and password, type them in the command line window to connect and gain remote access.
Can’t connect? Troubleshooting SSH settings
If you’re having SSH connectivity issues, these are possible causes:
- SSH software is not installed on either computer
- Your username or password is incorrect
- The IP address is incorrect
- The firewall is blocking the connection or port 22 is not forwarded
Double check each point and you should be able to connect. If not, the problem may be more complex.
Remote use of Linux with SSH
SSH is a useful tool for managing one or more Linux computers.
It allows you to work on any machine from a single system. You can enter almost anything Linux terminal command
40+ Most Used Linux Terminal Commands
The most important examples are:
- Update: sudo apt update && sudo apt update
- Check status: utilization
- Ongoing processes: ps
- Processes to be performed by processor: top
Check out our list SSH commands for managing a Linux server
How to remotely manage a Linux server with SSH
Install SSH and make Linux more efficient
With SSH, Linux becomes much more flexible and efficient. You can literally access your computer remotely using a smartphone using SSH.
If SSH is configured correctly, the client and server-side software is enabled and configured, the command-line remote access is possible. Need something more? Here’s how remotely control the Linux desktop from Windows
How to remote control Linux from Windows