root@lynx:~# systemctl status ssh ● ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled) Active: active (running) since Fri 2015-10-09 20:09:29 UTC; 55s ago Main PID: 26884 (sshd) CGroup: /system.slice/ssh.service └─26884 /usr/sbin/sshd -D Oct 09 20:09:29 lynx sshd[26884]: Server listening on 0.0.0.0 port 22. Oct 09 20:09:29 lynx sshd[26884]: Server listening on :: port 22.
[Unit] Description=OpenBSD Secure Shell server After=network.target auditd.service ConditionPathExists=!/etc/ssh/sshd_not_to_be_run [Service] EnvironmentFile=-/etc/default/ssh ExecStart=/usr/sbin/sshd -D $SSHD_OPTS ExecReload=/bin/kill -HUP $MAINPID KillMode=process Restart=on-failure [Install] WantedBy=multi-user.target Alias=sshd.service
Restart=always
root@lynx:~# systemctl daemon-reload root@lynx:~# systemctl restart ssh
root@lynx:~# systemctl status ssh ● ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled) Active: active (running) since Fri 2015-10-09 20:09:29 UTC; 3min 58s ago Main PID: 26884 (sshd) CGroup: /system.slice/ssh.service └─26884 /usr/sbin/sshd -D Oct 09 20:09:29 lynx sshd[26884]: Server listening on 0.0.0.0 port 22. Oct 09 20:09:29 lynx sshd[26884]: Server listening on :: port 22.
root@lynx:~# killall sshd root@lynx:~# systemctl status ssh ● ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled) Active: active (running) since Fri 2015-10-09 20:13:47 UTC; 1s ago Main PID: 14123 (sshd) CGroup: /system.slice/ssh.service └─14123 /usr/sbin/sshd -D Oct 09 20:13:47 lynx sshd[14123]: Server listening on 0.0.0.0 port 22. Oct 09 20:13:47 lynx sshd[14123]: Server listening on :: port 22.
Source: https://habr.com/ru/post/268583/
All Articles