FreeBSD Ports 를 이용하여 Nginx 를 설치 합니다.

Ports 로 설치 할때는 반드시 Ports Tree 를 업데이트 해야 합니다.

Test Machine 의 경우 Apache24-Mariadb102-php71 이 설치 되어 있는 관계로

Mariadb102 설치와 php71 설치 내용은 별도로 작성 하지 않겠습니다.

 

Ports 트리 업데이트

root@bsd11:~ # 
root@bsd11:~ # portsnap fetch
root@bsd11:~ # portsnap update
root@bsd11:~ # portsnap fetch update

 

2017년 11월 기준 ports nginx version 은 1.12.2 Version 입니다.

root@bsd11:/usr/ports # make search name=nginx
Port:   nginx-1.12.2_1,2
Path:   /usr/ports/www/nginx
Info:   Robust and small WWW server
Maint:  joneum@FreeBSD.org
B-deps: pcre-8.40_1
R-deps: pcre-8.40_1
WWW:    http://nginx.org/

 

설치

root@bsd11:~ # 
root@bsd11:~ # cd /usr/ports/www/nginx && make install clean

옵션선택

HTTP_GEOIP
HTTP_PERL
HTTP_IMAGE_FILTER
HTTP_AUTH_PAM
HTTP_DAV_EXT
HTTP_IMAGE_FILTER
HTTP_SUBS_FILTER
HTTP_ZIP
ECHO
HTTP_UPSTREAM_FAIR
HTTP_XSLT

OK 를 눌러 설치를 진행 합니다.

설치완료후 메세지

===================================================================
Recent version of the NGINX introduces dynamic modules support.  In
FreeBSD ports tree this feature was enabled by default with the DSO
knob.  Several vendor's and third-party modules have been converted
to dynamic modules.  Unset the DSO knob builds an NGINX without
dynamic modules support.

To load a module at runtime, include the new `load_module'
directive in the main context, specifying the path to the shared
object file for the module, enclosed in quotation marks.  When you
reload the configuration or restart NGINX, the module is loaded in.
It is possible to specify a path relative to the source directory,
or a full path, please see
https://www.nginx.com/blog/dynamic-modules-nginx-1-9-11/ and
http://nginx.org/en/docs/ngx_core_module.html#load_module for
details.

Default path for the NGINX dynamic modules is

/usr/local/libexec/nginx.
===================================================================

===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/sbin/nginx

      This port has installed the following startup scripts which may cause
      these network services to be started at boot time.
/usr/local/etc/rc.d/nginx

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
http://nginx.org/
===>  Cleaning for GeoIP-1.6.11
===>  Cleaning for libgd-2.2.4_1,1
===>  Cleaning for tiff-4.0.8
===>  Cleaning for jbigkit-2.1_1
===>  Cleaning for webp-0.6.0_4
===>  Cleaning for giflib-5.1.4
===>  Cleaning for nginx-1.12.2_1,2
root@bsd11:/usr/ports/www/nginx # rehash

 

/etc/rc.conf 파일 수정

root@bsd11:~ # 
root@bsd11:~ # vi /etc/rc.conf

php_fpm_enable="YES"
nginx_enable="YES"

 

php-fpm 설정 및  Daemon Start

root@bsd11:~ # 
root@bsd11:~ # cd /usr/local/etc/php-fpm.d/
root@bsd11:/usr/local/etc/php-fpm.d #
root@bsd11:/usr/local/etc/php-fpm.d # vi www.conf
listen.owner = www
listen.group = www
listen.mode = 0660


root@bsd11:~ # service php-fpm start
Performing sanity check on php-fpm configuration:
[19-Nov-2017 20:23:54] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful

Starting php_fpm.
root@bsd11:~ #

 

Daemon 구동 확인

root@bsd11:~ # sockstat -4
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
www      php-fpm    1179  0  tcp4   127.0.0.1:9000        *:*
www      php-fpm    1178  0  tcp4   127.0.0.1:9000        *:*
root     php-fpm    1177  8  tcp4   127.0.0.1:9000        *:*

 

GeoIP 설정

root@bsd11:~ # 
root@bsd11:~ # wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
--2017-11-19 22:20:02--  http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
Resolving geolite.maxmind.com (geolite.maxmind.com)... 104.16.37.47, 104.16.38.47, 2400:cb00:2048:1::6810:262f, ...
Connecting to geolite.maxmind.com (geolite.maxmind.com)|104.16.37.47|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 674238 (658K) [application/octet-stream]
Saving to: 'GeoIP.dat.gz'

GeoIP.dat.gz                                                        100%[==================================================================================================================================================================>] 658.44K  --.-KB/s    in 0.06s

2017-11-19 22:20:02 (11.0 MB/s) - 'GeoIP.dat.gz' saved [674238/674238]

root@bsd11:~ #  wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
--2017-11-19 22:20:22--  http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
Resolving geolite.maxmind.com (geolite.maxmind.com)... 104.16.38.47, 104.16.37.47, 2400:cb00:2048:1::6810:252f, ...
Connecting to geolite.maxmind.com (geolite.maxmind.com)|104.16.38.47|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11793186 (11M) [application/octet-stream]
Saving to: 'GeoLiteCity.dat.gz'

GeoLiteCity.dat.gz                                                  100%[==================================================================================================================================================================>]  11.25M  13.2MB/s    in 0.9s

2017-11-19 22:20:24 (13.2 MB/s) - 'GeoLiteCity.dat.gz' saved [11793186/11793186]

root@bsd11:~ #
root@bsd11:~ # gunzip ./GeoLiteCity.dat.gz
root@bsd11:~ # gunzip ./GeoIP.dat.gz
root@bsd11:~ # mv Geo* /usr/local/share/GeoIP/

 

Nginx 설정 (nginx.conf 파일수정)

root@bsd11:~ #
root@bsd11:~ # cd /usr/local/etc/nginx/
root@bsd11:/usr/local/etc/nginx # vi nginx.conf
root@bsd11:/usr/local/etc/nginx # cp nginx.conf nginx.conf.org
root@bsd11:/usr/local/etc/nginx # vi nginx.conf
user  www www;
worker_processes  4;
error_log  /var/log/nginx/error.log;
pid        /var/run/nginx.pid;
### Load Modules###
load_module "/usr/local/libexec/nginx/ngx_http_geoip_module.so";

events {
    worker_connections  1024;
}
http {
    geoip_country /usr/local/share/GeoIP/GeoIP.dat;
    geoip_city /usr/local/share/GeoIP/GeoLiteCity.dat;
    include /usr/local/etc/nginx/mime.types;
    default_type application/octet-stream;
    access_log off;
    server_tokens off;
    sendfile on;
    client_max_body_size 200m;
    client_body_buffer_size 1m;
    keepalive_timeout 1;
    port_in_redirect off;
    gzip on;
    gzip_http_version 1.1;
    gzip_vary on;
    gzip_comp_level 6;
    gzip_proxied any;
    gzip_types text/plain text/css application/json application/x-javascript application/xml application/xml+rss text/javascript;
    gzip_buffers 16 8k;
    gzip_disable "MSIE [1-6].(?!.*SV1)";
    include /usr/local/etc/nginx/conf.d/*.conf;
}

Load Modules 의 경우 geoip 사용을 위하여 load_module 을 추가 하였습니다.

 

fastcgi_params 수정

root@bsd11:/usr/local/etc/nginx # 
root@bsd11:/usr/local/etc/nginx # vi fastcgi_params
#GeoIp Setting
fastcgi_param GEOIP_ADDR $remote_addr;
fastcgi_param GEOIP_COUNTRY_CODE $geoip_country_code;
fastcgi_param GEOIP_COUNTRY_NAME $geoip_country_name;
fastcgi_param GEOIP_REGION $geoip_region;
fastcgi_param GEOIP_REGION_NAME $geoip_region_name;
fastcgi_param GEOIP_CITY $geoip_city;
fastcgi_param GEOIP_AREA_CODE $geoip_area_code;
fastcgi_param GEOIP_LATITUDE $geoip_latitude;
fastcgi_param GEOIP_LONGITUDE $geoip_longitude;
fastcgi_param GEOIP_POSTAL_CODE $geoip_postal_code;
fastcgi_param GEOIP_ORGANIZATION $geoip_org;

 

conf.d 디렉토리 생성 및 Directory 생성

root@bsd11:~ #
root@bsd11:~ # mkdir /usr/local/etc/nginx/conf.d
root@bsd11:~ #
root@bsd11:~ # mkdir -p /var/www/test.com
root@bsd11:~ # chown www:www /var/www/test.com
root@bsd11:~ # chmod 755 /var/www/test.com

 

phpinfo 페이지 생성

root@bsd11:~ #
root@bsd11:~ # sh -c 'echo "<?php phpinfo(); ?>" > /var/www/test.com/index.php'

 

test.com.conf 파일 생성 

root@bsd11:~ # 
root@bsd11:~ # cd /usr/local/etc/nginx/conf.d/
root@bsd11:/usr/local/etc/nginx/conf.d # vi test.com.conf

server {
    listen       80;
    server_name  localhost _;
    index        index.php index.html index.htm;
    root         /var/www/test.com;

    location / {
        try_files   $uri $uri/ /index.php?$query_string;
        autoindex on;
    }

    location ~ \.php$ {
        try_files $uri /index.php =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param GEOIP_COUNTRY_CODE $geoip_country_code;
        fastcgi_param GEOIP_COUNTRY_NAME $geoip_country_name;
        fastcgi_param SCRIPT_FILENAME $request_filename;
        include fastcgi_params;
    }
}

 

Nginx 실행

root@bsd11:~ # 
root@bsd11:~ # service nginx restart
Performing sanity check on nginx configuration:
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful
Stopping nginx.
Waiting for PIDS: 4815.
Performing sanity check on nginx configuration:
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful
Starting nginx.
root@bsd11:~ # sockstat -4
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
www      nginx      4865  7  tcp4   *:80                  *:*
www      nginx      4864  7  tcp4   *:80                  *:*
www      nginx      4863  7  tcp4   *:80                  *:*
www      nginx      4862  7  tcp4   *:80                  *:*
root     nginx      4861  7  tcp4   *:80                  *:*

 

웹브라우저 확인

Percona apache 템플릿을 이용하기 위해서는 ss_get_by_ssh.php 스크립트의 수정이 필요 하며

cacti 계정이 접속 할수 있도록 cshs 작업이 필요 합니다.

 

Apache httpd.conf 파일 수정 및 apache 재시작

root@bsd11:~ # 
root@bsd11:~ # cd /usr/local/etc/apache24/
root@bsd11:/usr/local/etc/apache24 # vi httpd.conf
<Location /server-status>
SetHandler server-status

Order Deny,Allow
Deny from all
Allow from localhost
</Location>
root@bsd11:~ # service apache24 restart

Allow from Domain 또는 localhost 로 설정 합니다.

 

Percona Apache 템플릿을 import 합니다.

root@bsd11:~ #
root@bsd11:~ #
root@bsd11:~ # php /usr/local/share/cacti/cli/import_template.php --filename=/usr/local/share/percona-monitoring-plugins/cacti/templates/cacti_host_template_percona_apache_server_ht_0.8.6i-sver1.1.3.xml
Read 74554 bytes of XML data
Import ResultsCacti has imported the following items for the Template:
CDEF
[success] Percona Turn Into Bits CDEF [unchanged]
[success] Percona Negate CDEF [unchanged]
GPRINT Preset
[success] Percona Apache Server Version t1.1.3:s1.1.3 [new]
[success] Percona Apache Server Checksum e5bcdec29950a544697949887ac841b4 [new]
[success] Percona Normal [unchanged]
Data Input Method
[success] Percona Get Apache Stats/Apache Requests IM [new]
[success] Percona Get Apache Stats/Apache Bytes IM [new]
[success] Percona Get Apache Stats/Apache CPU Load IM [new]
[success] Percona Get Apache Stats/Apache Workers IM [new]
[success] Percona Get Apache Stats/Apache Scoreboard IM [new]
Data Template
[success] Percona Apache Requests DT [new]
[success] Percona Apache Bytes DT [new]
[success] Percona Apache CPU Load DT [new]
[success] Percona Apache Workers DT [new]
[success] Percona Apache Scoreboard DT [new]
Graph Template
[success] Percona Apache Requests GT [new]
[success] Percona Apache Bytes GT [new]
[success] Percona Apache CPU Load GT [new]
[success] Percona Apache Workers GT [new]
[success] Percona Apache Scoreboard GT [new]
Device Template
[success] Percona Apache Server HT [new]
root@bsd11:~ #

 

ss_get_by_ssh.php 스크립트 수정 및 퍼미션 변경

root@bsd11:~ # 
root@bsd11:~ # cd /usr/local/share/cacti/scripts/
root@bsd11:/usr/local/share/cacti/scripts # vi ss_get_by_ssh.php
$ssh_user   = 'cacti';                           # SSH username
$ssh_port   = 22;                                # SSH port
$ssh_iden   = '-i /usr/share/cacti/cacti/.ssh/id_rsa'; # SSH identity

root@bsd11:/usr/local/share/cacti/scripts # chown cacti:cacti ss_get_by_ssh.php

 

cacti 유저 디렉토리 생성

root@bsd11:~ # cd /usr/local/share/cacti/
root@bsd11:/usr/local/share/cacti # mkdir -p cacti/.ssh
root@bsd11:/usr/local/share/cacti # chown -R cacti:cacti cacti/

 

chsh 명령어를 사용하여 cacti 유저 데이터베이스 파일을 변경합니다.

root@bsd11:~ #
root@bsd11:~ #
root@bsd11:~ # chsh cacti
#Changing user information for cacti.
Login: cacti
Password: *
Uid [#]: 107
Gid [# or name]: 107
Change [month day year]:
Expire [month day year]:
Class:
Home directory: /usr/local/share/cacti/cacti
Shell: /bin/csh
Full Name: Cacti Sandbox
Office Location:
Office Phone:
Home Phone:
Other information:

cacti 유저와는 별도로 다른유저로 생성을 하였지만 정상적으로 그래프를 생성하지 못하였습니다.

 

ssh-key 생성

root@bsd11:~ #
root@bsd11:~ #
root@bsd11:~ # su - cacti
% pwd
/usr/local/share/cacti/cacti
% ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/usr/local/share/cacti/cacti/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /usr/local/share/cacti/cacti/.ssh/id_rsa.
Your public key has been saved in /usr/local/share/cacti/cacti/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:8eb2tpB5MIkPhVlhgFT7iel8wyDq4ic3yu6Dvmuwuf4 cacti@bsd11
The key's randomart image is:
+---[RSA 2048]----+
|     ..oo.+.     |
|      .  *       |
|        = .      |
|         O o     |
|      . S O      |
|.    . + B =     |
|.+  .   o @ .    |
|+o+.+    o =.    |
|=XXE..     .o.   |
+----[SHA256]-----+
%
% cd .ssh/
% cat id_rsa.pub >> authorized_keys
% chmod 600 authorized_keys

 

ssh 접속 테스트

%
% ssh 127.0.0.1
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
ECDSA key fingerprint is SHA256:nIS4vw3Qw73/gmtI4JHoLs3h89qMlBRF68h8qfklpt8.
No matching host key fingerprint found in DNS.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '127.0.0.1' (ECDSA) to the list of known hosts.
FreeBSD 11.1-RELEASE (GENERIC) #0 r321309: Fri Jul 21 02:08:28 UTC 2017

Welcome to FreeBSD!

Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories:   https://www.FreeBSD.org/security/
FreeBSD Handbook:      https://www.FreeBSD.org/handbook/
FreeBSD FAQ:           https://www.FreeBSD.org/faq/
Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
FreeBSD Forums:        https://forums.FreeBSD.org/

Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with:  pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.

Show the version of FreeBSD installed:  freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages:  man man
FreeBSD directory layout:      man hier

Edit /etc/motd to change this login announcement.
% logout
Connection to 127.0.0.1 closed.
%
% ssh localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
ECDSA key fingerprint is SHA256:nIS4vw3Qw73/gmtI4JHoLs3h89qMlBRF68h8qfklpt8.
No matching host key fingerprint found in DNS.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
Last login: Sun Nov 19 02:33:19 2017 from localhost
FreeBSD 11.1-RELEASE (GENERIC) #0 r321309: Fri Jul 21 02:08:28 UTC 2017

Welcome to FreeBSD!

Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories:   https://www.FreeBSD.org/security/
FreeBSD Handbook:      https://www.FreeBSD.org/handbook/
FreeBSD FAQ:           https://www.FreeBSD.org/faq/
Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
FreeBSD Forums:        https://forums.FreeBSD.org/

Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with:  pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.

Show the version of FreeBSD installed:  freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages:  man man
FreeBSD directory layout:      man hier

Edit /etc/motd to change this login announcement.
% logout
Connection to localhost closed.
%

 

ss_get_by_ssh.php 스크립트 테스트 ( cacti 유저를 이용합니다.)

정상

% php /usr/local/share/cacti/scripts/ss_get_by_ssh.php --type apache0.0.1 --items gg,gh
gg:1 gh:2048%

 

 

비정상 

% php /usr/local/share/cacti/scripts/ss_get_by_ssh.php --type apache --host 127.0.0.1 --items gg,gh
gg:-1 gh:-1%

비정상일 경우 gg:-1 , gh: -1 로 값이 표기 됩니다.

 

웹브라우저 설정

Templates -> Data Source 에서 apache 템플릿을 검색 합니다.

 

Apache 템플릿을 클릭하여 Hostname 을 localhost 로 변경 합니다.

 

Management -> Devices 로 이동합니다.

ADD 버튼을 클릭하여 Device 를 추가 합니다.

 

Description : Apache-Server

Hostname : 127.0.0.1

Device Template : Percona Apache Server HP

Create 버튼을 클릭합니다.

 

Create Graphs for this Device 를 클릭합니다.

(우측상단)

 

모니터링 항목을 선택후 Create 버튼을 클릭합니다.

 

Graphs 메뉴를 클릭후 Device 를 Apache-Server 로 변경 하여 모니터링을 합니다.

최초 그래프 생성까지 약 5분 ~ 10분 정도 소요 됩니다.

 

모니터링 결과값 확인 (15분 경과)

 

/var/log/auth.log 확인

정상적인 로그

root@bsd11:~ # tail -f /var/log/auth.log
Nov 19 02:58:00 bsd11 sshd[2023]: Accepted publickey for cacti from 127.0.0.1 port 57872 ssh2: RSA SHA256:8eb2tpB5MIkPhVlhgFT7iel8wyDq4ic3yu6Dvmuwuf4
Nov 19 02:58:00 bsd11 sshd[2025]: Received disconnect from 127.0.0.1 port 57872:11: disconnected by user
Nov 19 02:58:00 bsd11 sshd[2025]: Disconnected from 127.0.0.1 port 57872
Nov 19 03:00:10 bsd11 sshd[2126]: Accepted publickey for cacti from 127.0.0.1 port 51733 ssh2: RSA SHA256:8eb2tpB5MIkPhVlhgFT7iel8wyDq4ic3yu6Dvmuwuf4
Nov 19 03:00:10 bsd11 sshd[2128]: Received disconnect from 127.0.0.1 port 51733:11: disconnected by user
Nov 19 03:00:10 bsd11 sshd[2128]: Disconnected from 127.0.0.1 port 51733
Nov 19 03:01:00 bsd11 sshd[2292]: Accepted publickey for cacti from 127.0.0.1 port 41944 ssh2: RSA SHA256:8eb2tpB5MIkPhVlhgFT7iel8wyDq4ic3yu6Dvmuwuf4
Nov 19 03:01:00 bsd11 sshd[2295]: Received disconnect from 127.0.0.1 port 41944:11: disconnected by user
Nov 19 03:01:00 bsd11 sshd[2295]: Disconnected from 127.0.0.1 port 41944
Nov 19 03:02:21 bsd11 sshd[2450]: Accepted keyboard-interactive/pam for root from 112.187.207.28 port 12688 ssh2
Nov 19 03:04:00 bsd11 sshd[2502]: Accepted publickey for cacti from 127.0.0.1 port 17207 ssh2: RSA SHA256:8eb2tpB5MIkPhVlhgFT7iel8wyDq4ic3yu6Dvmuwuf4
Nov 19 03:04:01 bsd11 sshd[2504]: Received disconnect from 127.0.0.1 port 17207:11: disconnected by user
Nov 19 03:04:01 bsd11 sshd[2504]: Disconnected from 127.0.0.1 port 17207

 

비정상적인 로그

root@bsd11:~ # tail -f /var/log/auth.log
Nov 19 03:00:10 bsd11 sshd[2126]: Accepted publickey for cacti from 127.0.0.1 port 51733 ssh2: RSA SHA256:8eb2tpB5MIkPhVlhgFT7iel8wyDq4ic3yu6Dvmuwuf4
Nov 19 03:00:10 bsd11 sshd[2128]: Received disconnect from 127.0.0.1 port 51733:11: disconnected by user
Nov 19 03:00:10 bsd11 sshd[2128]: Disconnected from 127.0.0.1 port 51733
Nov 19 03:00:10 bsd11 sshd[2128]: error: PAM: authentication error for cacti from localhost
Nov 19 03:01:00 bsd11 sshd[2292]: Accepted publickey for cacti from 127.0.0.1 port 41944 ssh2: RSA SHA256:8eb2tpB5MIkPhVlhgFT7iel8wyDq4ic3yu6Dvmuwuf4
Nov 19 03:01:00 bsd11 sshd[2295]: Received disconnect from 127.0.0.1 port 41944:11: disconnected by user
Nov 19 03:01:00 bsd11 sshd[2295]: Disconnected from 127.0.0.1 port 41944
Nov 19 03:00:10 bsd11 sshd[2128]: error: PAM: authentication error for cacti from localhost
Nov 19 03:02:21 bsd11 sshd[2450]: Accepted keyboard-interactive/pam for root from 112.187.207.28 port 12688 ssh2
Nov 19 03:04:00 bsd11 sshd[2502]: Accepted publickey for cacti from 127.0.0.1 port 17207 ssh2: RSA SHA256:8eb2tpB5MIkPhVlhgFT7iel8wyDq4ic3yu6Dvmuwuf4
Nov 19 03:04:01 bsd11 sshd[2504]: Received disconnect from 127.0.0.1 port 17207:11: disconnected by user
Nov 19 03:04:01 bsd11 sshd[2504]: Disconnected from 127.0.0.1 port 17207

Nov 19 03:00:10 bsd11 sshd[2128]: error: PAM: authentication error for cacti from localhost 메시지가 출력 됩니다.