Configure SSH Server to login from remote computer.
[1] OpenSSH is already installed by default even if you install Future OS with [Workstation Installation], so you don't need to install new packages. By default, you can login with password authentication for [Server Setup], but for security, you can change some settings as follows. For [Workstation Setup], the OpenSSH service is disabled by default!
[root@localhost ~]# vi /etc/ssh/sshd_config
...
# line 40: change ( prohibit root login remotely )
PermitRootLogin prohibit-password
...
[root@localhost ~]# systemctl restart sshd
[2] If Firewalld is running, allow SSH service. SSH uses 22/TCP.
[root@localhost ~]# firewall-cmd --permanent --add-service=ssh
success
[root@localhost ~]# firewall-cmd --reload
success
Configure SSH Client for Future OS
[1] Install SSH Client.
[root@localhost ~]# dnf install openssh-clients -y
[2] Connect to SSH server with a common user.
# ssh [username@(hostname or IP address)]
[future@localhost ~]# ssh [email protected]
The authenticity of host 'futurelinux.org (192.168.1.250)' can't be established.
ECDSA key fingerprint is SHA256:COEJgdHqJ1vvwT6C3MzrX9kqeDwx6ulcLKD5w6CCJ1c.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'futurelinux.org,192.168.1.250' (ECDSA) to the list of known hosts.
[email protected]'s password:
Last login: Sat Sep 25 21:14:03 2021 from 192.168.1.2
[root@futurelinux ~]#
[3] It's possbile to execute commands on remote Host with SSH like follows.
# for example, run [ls -la]
[future@localhost ~]# ssh [email protected] "ls -la"
total 68
drwx------ 6 root root 4096 Sep 25 21:19 .
dr-xr-xr-x 19 root root 4096 Feb 2 2021 ..
-rw------- 1 root root 23841 Sep 25 14:54 .bash_history
-rw-r--r-- 1 root root 18 Feb 2 2021 .bash_logout
-rw-r--r-- 1 root root 176 Feb 2 2021 .bash_profile
-rw-r--r-- 1 root root 176 Feb 2 2021 .bashrc
...
-rw-r--r-- 1 root root 129 Feb 2 2021 .tcshrc