Firewall:
ufw status numbered
- OpenSSH ALLOW IN
Клиент терминал windows, подключаюсь вот так для локального ip:
ssh <ip>
- дальше ввожу пароль от юзера.
ssh <user>@<ip>
- дальше ввожу пароль.
Для домена ip:
ssh <domain>
- дальше ввожу пароль от юзера.
ssh <user>@<domain>
- дальше ввожу пароль.
Telnet - Could not open connection to the host, on port 22: Connect failed
Ssh - ssh: connect to host domain.com port 22: Connection timed out
На сервере стоит ubuntu server 20.04.
systemctl status ssh
-
ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2023-08-23 15:57:45 UTC; 16min ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 931 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 991 (sshd)
Tasks: 1 (limit: 38252)
Memory: 7.7M
CPU: 98ms
CGroup: /system.slice/ssh.service
└─991 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"
авг 23 15:57:43 SERVER systemd[1]: Starting OpenBSD Secure Shell server...
авг 23 15:57:45 SERVER sshd[991]: Server listening on 0.0.0.0 port 22.
авг 23 15:57:45 SERVER sshd[991]: Server listening on :: port 22.
авг 23 15:57:45 SERVER systemd[1]: Started OpenBSD Secure Shell server.
авг 23 15:58:35 SERVER sshd[2416]: Accepted password for USER from 192.168.0.104 port 64466 ssh2
авг 23 15:58:35 SERVER sshd[2416]: pam_unix(sshd:session): session opened for user USER (uid=1000) by (uid=0)
авг 23 16:11:02 SERVER sshd[3071]: Accepted password for USER from 192.168.0.104 port 65149 ssh2
авг 23 16:11:02 SERVER sshd[3071]: pam_unix(sshd:session): session opened for user USER (uid=1000) by (uid=0)