{"id":14263,"date":"2022-01-24T19:10:06","date_gmt":"2022-01-24T19:10:06","guid":{"rendered":"https:\/\/linuxways.net\/?p=14263"},"modified":"2022-01-24T19:10:06","modified_gmt":"2022-01-24T19:10:06","slug":"how-to-enable-ssh-on-opensuse","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/opensuse\/how-to-enable-ssh-on-opensuse\/","title":{"rendered":"How to Enable SSH on openSUSE"},"content":{"rendered":"<p>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.<\/p>\n<p>This post explains how to enable SSH on the openSUSE system. For other Linux distributions, you can visit how to enable SSH on <a href=\"https:\/\/linuxways.net\/de\/ubuntu\/how-to-ssh-ubuntu-server-20-04-lts\/\">Ubuntu<\/a> and <a href=\"https:\/\/linuxways.net\/de\/centos\/how-to-enable-ssh-on-centos\/\">CentOS<\/a>.<\/p>\n<p><strong>Note<\/strong>: The methods described here have been demonstrated on <strong>openSUSE Leap 15.3<\/strong>.<\/p>\n<h2>Enabling SSH on openSUSE<\/h2>\n<p>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\u2019s Terminal:<\/p>\n<pre>$ ssh -V<\/pre>\n<p>If you see the SSH version number in the output as shown below, it means SSH is installed on your system.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"458\" height=\"52\" class=\"wp-image-14264\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-496.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-496.png 458w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-496-300x34.png 300w\" sizes=\"auto, (max-width: 458px) 100vw, 458px\" \/><\/p>\n<p>However, if for any reason SSH is not installed or have been removed, you can install it as shown below:<\/p>\n<pre>$ sudo zypper install openssh<\/pre>\n<p>Now you will have to provide the sudo password. Type the password and then press <strong>Enter<\/strong>. This will install OpenSSH to your openSUSE system.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"660\" height=\"205\" class=\"wp-image-14265\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-497.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-497.png 660w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-497-300x93.png 300w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/p>\n<p>SSH comes pre-installed but it is not enabled by default on the openSUSE. You can start the SSH service through the command below:<\/p>\n<pre>$ sudo rcsshd start<\/pre>\n<p>To verify if the SSH is started, use the command below:<\/p>\n<pre>$ sudo rcsshd status<\/pre>\n<p>The output below verifies that SSH service is started and running on our system.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"807\" height=\"164\" class=\"wp-image-14266\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-498.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-498.png 807w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-498-300x61.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-498-768x156.png 768w\" sizes=\"auto, (max-width: 807px) 100vw, 807px\" \/><\/p>\n<h2>Open port 22 in the Firewall<\/h2>\n<p>To connect to your SSH server from another system, you will need to open the default SSH port 22 in your firewall.<\/p>\n<p>You can open port 22 in your firewall through this command:<\/p>\n<pre>$ sudo firewall-cmd --zone=public --add-port=22\/tcp<\/pre>\n<p>To verify if the port has been added, run the command below:<\/p>\n<pre>$ sudo firewall-cmd --zone=public --list-ports<\/pre>\n<p>This command should list port 22 in the output.<\/p>\n<h2>Connecting to SSH Server<\/h2>\n<p>Now you can connect to your SSH server from a remote system.<\/p>\n<p>1. Login to your remote system. Open the Terminal and run the below command to connect to the SSH server:<\/p>\n<pre>$ ssh user@ip_address -p port_number<\/pre>\n<p>For instance, to connect to the SSH server with an IP address 192.168.72.200 with the username kbuzdar (a user on the SSH server) on the default port 22, the command would be:<\/p>\n<pre>$ ssh kbuzdar@192.168.72.200<\/pre>\n<p><strong>Note<\/strong>: If you do not specify the port number in the above command, it will by default connect to port 22. You can also <a href=\"https:\/\/linuxways.net\/de\/ubuntu\/how-to-change-ssh-port-in-linux\/\">change the default SSH port<\/a> to something other than 22 in Linux.<\/p>\n<p>2. When you connect to the SSH server for the first time, you will be asked to confirm the identity of the server. Type <em>yes<\/em> and hit <strong>Enter<\/strong> to confirm.<\/p>\n<p>3. After that you will be asked for the password. Type the password for the user account on the SSH server and hit <strong>Enter<\/strong>. After that, you will be connected to your SSH server and will get a command line you can use to run commands.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"815\" height=\"268\" class=\"wp-image-14267\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-499.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-499.png 815w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-499-300x99.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-499-768x253.png 768w\" sizes=\"auto, (max-width: 815px) 100vw, 815px\" \/><\/p>\n<p>You can also configure <a href=\"https:\/\/linuxways.net\/de\/ubuntu\/how-to-set-up-passwordless-ssh-authentication-on-linux\/\">passwordless SSH authentication<\/a> to connect to the SSH server without using a password.<\/p>\n<p>This is how you can enable SSH on your openSUSE system. After enabling the SSH server, it is important to <a href=\"https:\/\/linuxways.net\/de\/centos\/11-best-ways-to-secure-your-ssh-server\/\">secure<\/a> your SSH server to avoid various security risks. For more information about SSH on openSUSE, visit this <a href=\"https:\/\/en.opensuse.org\/SDB:OpenSSH_basics\">documentation<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>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&hellip;<\/p>","protected":false},"author":1,"featured_media":14328,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[83],"tags":[858,21],"class_list":["post-14263","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-opensuse","tag-opensuse","tag-ssh"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/14263","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=14263"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/14263\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/14328"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=14263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=14263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=14263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}