×


Enable SSH on openSUSE Leap 15.3 - Step by step guide ?


Enable SSH on openSUSE Leap 15.3 - Step by step guide ?

SSH is a widely used network protocol that enables users, particularly network administrators to access and control a system remotely. Using SSH, a user can log in to a remote system over the network, run commands, and transfer files from one system to another.

Here at LinuxAPT, we shall look into how to enable SSH on the openSUSE system.

For other Linux distributions, you can visit how to enable SSH on Ubuntu, CentOS and Debian.

For more information about SSH on openSUSE, visit this documentation.


How to enable SSH on openSUSE ?

You do not need to install SSH on openSUSE as it comes installed by default. You can verify it through the command below in your system's Terminal:

$ ssh -V

If you see the SSH version number in the output as shown below, it means SSH is installed on your system.

However, if for any reason SSH is not installed or have been removed, you can install it with the below command:

$ sudo zypper install openssh

Now you will have to provide the sudo password. Type the password and then press Enter. This will install OpenSSH to your openSUSE system.

SSH comes pre-installed but it is not enabled by default on the openSUSE. You can start the SSH service through the command below:

$ sudo rcsshd start

To verify if the SSH is started, use the command below:

$ sudo rcsshd status

The output will verify that SSH service is started and running on our system.


How to Open port 22 in the Firewall ?

To connect to your SSH server from another system, you will need to open the default SSH port 22 in your firewall.

You can open port 22 in your firewall through this command:

$ sudo firewall-cmd --zone=public --add-port=22/tcp

To verify if the port has been added, run the command below:

$ sudo firewall-cmd --zone=public --list-ports

This command should list port 22 in the output.


How to connect to SSH Server ?

Now you can connect to your SSH server from a remote system.

1. Login to your remote system. Open the Terminal and run the below command to connect to the SSH server:

$ ssh user@ip_address -p port_number

For instance, to connect to the SSH server with an IP address 192.168.72.200 with the username linuxapt (a user on the SSH server) on the default port 22, the command would be:

$ ssh linuxapt@192.168.72.200

Note: If you do not specify the port number in the above command, it will by default connect to port 22. You can also change the default SSH port to something other than 22 in Linux.


2. When you connect to the SSH server for the first time, you will be asked to confirm the identity of the server. Type yes and hit Enter to confirm.


3. After that you will be asked for the password. Type the password for the user account on the SSH server and hit Enter. After that, you will be connected to your SSH server and will get a command line you can use to run commands.

You can also configure passwordless SSH authentication to connect to the SSH server without using a password.


[Need help in fixing Linux System issues ? We can help you. ]


Conclusion

This article covers how you can enable SSH on your openSUSE system. In fact, after enabling the SSH server, it is important to secure your SSH server to avoid various security risks. 


How to install  and enable FirewallD on openSUSE system ?

Run the following zypper command:

$ sudo zypper ref
$ sudo zypper update
$ sudo zypper install firewalld

Enable the firewall at boot time using the systemctl command:

$ sudo systemctl enable firewalld

Start the firewall on OpenSUSE Linux:

$ sudo systemctl start firewalld

Get status of your firewall:

$ sudo systemctl status firewalld

Search by typing a one letter Word Term Here