OS: Ubuntu Linux
Veendume, et SSH-serveri teenus töötab ja on seetõttu ka juba paigaldatud.
valida üks neist:
systemctl status ssh
# VÕI
systemctl status sshd
# VÕI
systemctl status sshd.service
# VÕI
service ssh status
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2023-04-19 13:06:20 UTC; 1min 9s ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 674 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 690 (sshd)
Tasks: 1 (limit: 2215)
Memory: 6.8M
CPU: 45ms
CGroup: /system.slice/ssh.service
└─690 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"
Apr 19 13:06:20 server systemd[1]: Starting OpenBSD Secure Shell server...
Apr 19 13:06:20 server sshd[690]: Server listening on 0.0.0.0 port 22.
Apr 19 13:06:20 server sshd[690]: Server listening on :: port 22.
Apr 19 13:06:20 server systemd[1]: Started OpenBSD Secure Shell server.
Apr 19 13:07:07 server sshd[972]: Accepted password for student from 192.168.56.1 port 55972 ssh2
Apr 19 13:07:07 server sshd[972]: pam_unix(sshd:session): session opened for user student(uid=1000) by (uid=0)
# vajadusel q abil saab väljuda
Kui on teade:
Active: active (running)
… siis SSH-server töötab.
Vajadusel OpenSSH serveri paigaldamine
# metapakett ssh, mis paigaldab nii kliendi kui serveri:
sudo apt update && sudo apt install ssh && sudo apt clean
# vajadusel ainult server:
sudo apt update && sudo apt install openssh-server && sudo apt clean
# on ka eraldi pakett openssh-client
# otsida saab:
apt-cache search openssh|grep openssh