Fedora 41
Sponsored Link

OpenSSH : Password Authentication2024/10/31

 
Configure SSH Server to operate server from remote computers.
[1] OpenSSH is already installed by default even if you installed Fedora with Minimal Install, so it does not need to install new packages. You can login with Password Authentication by default.
[root@dlp ~]#
systemctl status sshd

● sshd.service - OpenSSH server daemon
     Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; preset: ena>
    Drop-In: /usr/lib/systemd/system/service.d
             +-- 10-timeout-abort.conf
     Active: active (running) since Thu 2024-10-31 10:22:52 JST; 42min ago
 Invocation: 0e7f74ca692d4218b2fee152931503f1
       Docs: man:sshd(8)
             man:sshd_config(5)
   Main PID: 907 (sshd)
      Tasks: 1 (limit: 4645)
     Memory: 1.4M (peak: 1.6M)
        CPU: 9ms
     CGroup: /system.slice/sshd.service
.....
.....
[2] If Firewalld is running, allow SSH service. SSH uses [22/TCP]. (Generally it is allowed by default)
[root@dlp ~]#
firewall-cmd --add-service=ssh

success
[root@dlp ~]#
firewall-cmd --runtime-to-permanent

success
SSH Client : Fedora
 
Configure SSH Client for Fedora.
[3] Install SSH Client.
[root@client ~]#
dnf -y install openssh-clients
[4] Connect to SSH server with any common user.
# ssh [username@(hostname or IP address)]

[fedora@client ~]$
ssh fedora@dlp.srv.world

The authenticity of host 'dlp.srv.world (10.0.0.30)' can't be established.
ED25519 key fingerprint is SHA256:d6bbyQgjLbqg2eTAsxEgNeZX1b6w/3iotKQi54eFaOM.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'dlp.srv.world' (ED25519) to the list of known hosts.
fedora@dlp.srv.world's password:
Web console: https://dlp.srv.world:9090/ or https://10.0.0.30:9090/

Last login: Thu Oct 31 10:34:20 2024
[fedora@dlp ~]$   # logined
[5] It's possible to execute commands on remote Host with SSH like follows.
# for example, run [cat /etc/passwd]

[fedora@client ~]$
ssh fedora@dlp.srv.world "cat /etc/passwd"

fedora@dlp.srv.world's password:

.....
.....
systemd-coredump:x:990:990:systemd Core Dumper:/:/usr/sbin/nologin
systemd-resolve:x:193:193:systemd Resolver:/:/usr/sbin/nologin
systemd-timesync:x:989:989:systemd Time Synchronization:/:/usr/sbin/nologin
fedora:x:1000:1000::/home/fedora:/bin/bash
redhat:x:1001:1002::/home/redhat:/bin/bash
SSH Client : Windows #1
 
Configure SSH Client for Windows. This example is on Windows 11.
[6]
Download SSH Client software for Windows.
On this example, it shows Putty (www.chiark.greenend.org.uk/~sgtatham/putty/).
Install and start Putty, then Input your server's Hostname or IP address on [Host name] field and Click [Open] button to connect.
[7] After successfully passed authentication, it's possible to login and operate Fedora server from remote computers.
SSH Client : Windows #2
[8] On Windows 11, OpenSSH Client has been implemented as a Windows feature,
so it's possible to use [ssh] command on PowerShell or Command Prompt without Putty or other 3rd party SSH softwares.
It's the same usage because it's the OpenSSH Client, refer to [4], [5] section.
Matched Content