Хотел сменить порт с 22 на 21, отредактировал конфиг через sftp, руками... Сохранил.. Теперь не могу законектится к серверу...
Хорошо не закрыл putty, на просторах интернета нашел команду - vim /etc/ssh/sshd_config , захожу туда вижу это:
Жму допустим Recovery открывается конфиг:
Вопрос как мне его сохранить теперь?
При команде - service sshd restart выдает такое:
Job for ssh.service failed because the control process exited with error code.
See "systemctl status ssh.service" and "journalctl -xe" for details.
Код: Выделить всё
root@ds1492:~# systemctl status ssh.service[/b]
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2020-04-02 15:07:30 MSK; 40s ago
Process: 13865 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited, status=255)
Process: 13863 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 13865 (code=exited, status=255)
Apr 02 15:07:30 ds1492 systemd[1]: Starting OpenBSD Secure Shell server...
Apr 02 15:07:30 ds1492 systemd[1]: ssh.service: Main process exited, code=exited, status=255/n/a
Apr 02 15:07:30 ds1492 systemd[1]: Failed to start OpenBSD Secure Shell server.
Apr 02 15:07:30 ds1492 systemd[1]: ssh.service: Unit entered failed state.
Apr 02 15:07:30 ds1492 systemd[1]: ssh.service: Failed with result 'exit-code'.
Код: Выделить всё
[b]root@ds1492:~# journalctl -xe[/b]
Apr 02 15:07:18 ds1492 ntpd[599]: error resolving pool 0.debian.pool.ntp.org: Temporary failure in name resolution
Apr 02 15:07:22 ds1492 ntpd[599]: Soliciting pool server 46.40.123.212
Apr 02 15:07:25 ds1492 ntpd[599]: Soliciting pool server 85.21.78.23
Apr 02 15:07:30 ds1492 systemd[1]: Starting OpenBSD Secure Shell server...
-- Subject: Unit ssh.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit ssh.service has begun starting up.
Apr 02 15:07:30 ds1492 sshd[13865]: error: Bind to port 21 on 0.0.0.0 failed: Address already in use.
Apr 02 15:07:30 ds1492 sshd[13865]: error: Bind to port 21 on :: failed: Address already in use.
Apr 02 15:07:30 ds1492 sshd[13865]: fatal: Cannot bind any address.
Apr 02 15:07:30 ds1492 systemd[1]: ssh.service: Main process exited, code=exited, status=255/n/a
Apr 02 15:07:30 ds1492 systemd[1]: Failed to start OpenBSD Secure Shell server.
-- Subject: Unit ssh.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit ssh.service has failed.
--
-- The result is failed.
Apr 02 15:07:30 ds1492 systemd[1]: ssh.service: Unit entered failed state.
Apr 02 15:07:30 ds1492 systemd[1]: ssh.service: Failed with result 'exit-code'.
Apr 02 15:07:39 ds1492 ntpd[599]: Soliciting pool server 81.211.37.18
Apr 02 15:08:23 ds1492 ntpd[599]: error resolving pool 0.debian.pool.ntp.org: Temporary failure in name resolution
Apr 02 15:08:29 ds1492 ntpd[599]: Soliciting pool server 158.69.35.227
Apr 02 15:08:44 ds1492 ntpd[599]: Soliciting pool server 91.209.94.10
Apr 02 15:08:49 ds1492 ntpd[599]: error resolving pool 2.debian.pool.ntp.org: Temporary failure in name resolution