質問編集履歴
5
内容修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -207,72 +207,4 @@
|
|
207
207
|
# AllowTcpForwarding no
|
208
208
|
# PermitTTY no
|
209
209
|
# ForceCommand cvs server
|
210
|
-
```
|
211
|
-
|
212
|
-
###cat /etc/nsswitch.conf(10月14日 追記)
|
213
|
-
```
|
214
|
-
[root@localhost ~]# cat /etc/nsswitch.conf
|
215
|
-
#
|
216
|
-
# /etc/nsswitch.conf
|
217
|
-
#
|
218
|
-
# An example Name Service Switch config file. This file should be
|
219
|
-
# sorted with the most-used services at the beginning.
|
220
|
-
#
|
221
|
-
# The entry '[NOTFOUND=return]' means that the search for an
|
222
|
-
# entry should stop if the search in the previous entry turned
|
223
|
-
# up nothing. Note that if the search failed due to some other reason
|
224
|
-
# (like no NIS server responding) then the search continues with the
|
225
|
-
# next entry.
|
226
|
-
#
|
227
|
-
# Valid entries include:
|
228
|
-
#
|
229
|
-
# nisplus Use NIS+ (NIS version 3)
|
230
|
-
# nis Use NIS (NIS version 2), also called YP
|
231
|
-
# dns Use DNS (Domain Name Service)
|
232
|
-
# files Use the local files
|
233
|
-
# db Use the local database (.db) files
|
234
|
-
# compat Use NIS on compat mode
|
235
|
-
# hesiod Use Hesiod for user lookups
|
236
|
-
# [NOTFOUND=return] Stop searching if not found so far
|
237
|
-
#
|
238
|
-
|
239
|
-
# To use db, put the "db" in front of "files" for entries you want to be
|
240
|
-
# looked up first in the databases
|
241
|
-
#
|
242
|
-
# Example:
|
243
|
-
#passwd: db files nisplus nis
|
244
|
-
#shadow: db files nisplus nis
|
245
|
-
#group: db files nisplus nis
|
246
|
-
|
247
|
-
passwd: files sss
|
248
|
-
shadow: files sss
|
249
|
-
group: files sss
|
250
|
-
#initgroups: files
|
251
|
-
|
252
|
-
#hosts: db files nisplus nis dns
|
253
|
-
hosts: files dns
|
254
|
-
|
255
|
-
# Example - obey only what nisplus tells us...
|
256
|
-
#services: nisplus [NOTFOUND=return] files
|
257
|
-
#networks: nisplus [NOTFOUND=return] files
|
258
|
-
#protocols: nisplus [NOTFOUND=return] files
|
259
|
-
#rpc: nisplus [NOTFOUND=return] files
|
260
|
-
#ethers: nisplus [NOTFOUND=return] files
|
261
|
-
#netmasks: nisplus [NOTFOUND=return] files
|
262
|
-
|
263
|
-
bootparams: nisplus [NOTFOUND=return] files
|
264
|
-
|
265
|
-
ethers: files
|
266
|
-
netmasks: files
|
267
|
-
networks: files
|
268
|
-
protocols: files
|
269
|
-
rpc: files
|
270
|
-
services: files sss
|
271
|
-
|
272
|
-
netgroup: files sss
|
273
|
-
|
274
|
-
publickey: nisplus
|
275
|
-
|
276
|
-
automount: files sss
|
277
|
-
aliases: files nisplus
|
278
210
|
```
|
4
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -207,4 +207,72 @@
|
|
207
207
|
# AllowTcpForwarding no
|
208
208
|
# PermitTTY no
|
209
209
|
# ForceCommand cvs server
|
210
|
+
```
|
211
|
+
|
212
|
+
###cat /etc/nsswitch.conf(10月14日 追記)
|
213
|
+
```
|
214
|
+
[root@localhost ~]# cat /etc/nsswitch.conf
|
215
|
+
#
|
216
|
+
# /etc/nsswitch.conf
|
217
|
+
#
|
218
|
+
# An example Name Service Switch config file. This file should be
|
219
|
+
# sorted with the most-used services at the beginning.
|
220
|
+
#
|
221
|
+
# The entry '[NOTFOUND=return]' means that the search for an
|
222
|
+
# entry should stop if the search in the previous entry turned
|
223
|
+
# up nothing. Note that if the search failed due to some other reason
|
224
|
+
# (like no NIS server responding) then the search continues with the
|
225
|
+
# next entry.
|
226
|
+
#
|
227
|
+
# Valid entries include:
|
228
|
+
#
|
229
|
+
# nisplus Use NIS+ (NIS version 3)
|
230
|
+
# nis Use NIS (NIS version 2), also called YP
|
231
|
+
# dns Use DNS (Domain Name Service)
|
232
|
+
# files Use the local files
|
233
|
+
# db Use the local database (.db) files
|
234
|
+
# compat Use NIS on compat mode
|
235
|
+
# hesiod Use Hesiod for user lookups
|
236
|
+
# [NOTFOUND=return] Stop searching if not found so far
|
237
|
+
#
|
238
|
+
|
239
|
+
# To use db, put the "db" in front of "files" for entries you want to be
|
240
|
+
# looked up first in the databases
|
241
|
+
#
|
242
|
+
# Example:
|
243
|
+
#passwd: db files nisplus nis
|
244
|
+
#shadow: db files nisplus nis
|
245
|
+
#group: db files nisplus nis
|
246
|
+
|
247
|
+
passwd: files sss
|
248
|
+
shadow: files sss
|
249
|
+
group: files sss
|
250
|
+
#initgroups: files
|
251
|
+
|
252
|
+
#hosts: db files nisplus nis dns
|
253
|
+
hosts: files dns
|
254
|
+
|
255
|
+
# Example - obey only what nisplus tells us...
|
256
|
+
#services: nisplus [NOTFOUND=return] files
|
257
|
+
#networks: nisplus [NOTFOUND=return] files
|
258
|
+
#protocols: nisplus [NOTFOUND=return] files
|
259
|
+
#rpc: nisplus [NOTFOUND=return] files
|
260
|
+
#ethers: nisplus [NOTFOUND=return] files
|
261
|
+
#netmasks: nisplus [NOTFOUND=return] files
|
262
|
+
|
263
|
+
bootparams: nisplus [NOTFOUND=return] files
|
264
|
+
|
265
|
+
ethers: files
|
266
|
+
netmasks: files
|
267
|
+
networks: files
|
268
|
+
protocols: files
|
269
|
+
rpc: files
|
270
|
+
services: files sss
|
271
|
+
|
272
|
+
netgroup: files sss
|
273
|
+
|
274
|
+
publickey: nisplus
|
275
|
+
|
276
|
+
automount: files sss
|
277
|
+
aliases: files nisplus
|
210
278
|
```
|
3
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -27,6 +27,30 @@
|
|
27
27
|
もし解る方がいらっしゃいましたら教えていただけますと幸いです。
|
28
28
|
よろしくお願い致します。
|
29
29
|
|
30
|
+
###/bin/systemctl status sshd.service
|
31
|
+
IPアドレスを一部隠しています。
|
32
|
+
```
|
33
|
+
[root@localhost ~]# /bin/systemctl status sshd.service
|
34
|
+
● sshd.service - OpenSSH server daemon
|
35
|
+
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
|
36
|
+
Active: active (running) since 木 2020-09-03 13:43:24 JST; 1 months 9 days ago
|
37
|
+
Docs: man:sshd(8)
|
38
|
+
man:sshd_config(5)
|
39
|
+
Main PID: 1427 (sshd)
|
40
|
+
CGroup: /system.slice/sshd.service
|
41
|
+
└─1427 /usr/sbin/sshd -D
|
42
|
+
|
43
|
+
10月 13 09:08:21 localhost.localdomain sshd[4877]: Accepted password for root from 192.168.xx.xx port 55275 ssh2
|
44
|
+
10月 13 09:09:49 localhost.localdomain sshd[4929]: Accepted password for root from 192.168.xx.xx port 55281 ssh2
|
45
|
+
10月 13 09:10:02 localhost.localdomain sshd[4959]: Accepted password for root from 192.168.xx.xx port 55282 ssh2
|
46
|
+
10月 13 09:14:00 localhost.localdomain sshd[5051]: Accepted password for root from 192.168.xx.xx port 55290 ssh2
|
47
|
+
10月 13 09:20:17 localhost.localdomain sshd[5189]: Accepted password for root from 192.168.xx.xx port 55301 ssh2
|
48
|
+
10月 13 13:55:58 localhost.localdomain sshd[10262]: Accepted password for root from 192.168.xx.xx port 56939 ssh2
|
49
|
+
10月 13 15:04:18 localhost.localdomain sshd[11562]: Accepted password for root from 192.168.xx.xx port 57131 ssh2
|
50
|
+
10月 13 15:10:10 localhost.localdomain sshd[11693]: Accepted password for root from 192.168.xx.xx port 57148 ssh2
|
51
|
+
10月 13 15:55:36 localhost.localdomain sshd[12538]: Accepted password for root from 192.168.xx.xx port 57574 ssh2
|
52
|
+
10月 13 16:03:59 localhost.localdomain sshd[12727]: Accepted password for root from 192.168.xx.xx port 57772 ssh2
|
53
|
+
```
|
30
54
|
###sshd_config
|
31
55
|
```
|
32
56
|
[root@localhost ~]# cat /etc/ssh/sshd_config
|
2
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -25,4 +25,162 @@
|
|
25
25
|
(調べ方が悪いだけかもですが...)
|
26
26
|
|
27
27
|
もし解る方がいらっしゃいましたら教えていただけますと幸いです。
|
28
|
-
よろしくお願い致します。
|
28
|
+
よろしくお願い致します。
|
29
|
+
|
30
|
+
###sshd_config
|
31
|
+
```
|
32
|
+
[root@localhost ~]# cat /etc/ssh/sshd_config
|
33
|
+
# $OpenBSD: sshd_config,v 1.93 2014/01/10 05:59:19 djm Exp $
|
34
|
+
|
35
|
+
# This is the sshd server system-wide configuration file. See
|
36
|
+
# sshd_config(5) for more information.
|
37
|
+
|
38
|
+
# This sshd was compiled with PATH=/usr/local/bin:/usr/bin
|
39
|
+
|
40
|
+
# The strategy used for options in the default sshd_config shipped with
|
41
|
+
# OpenSSH is to specify options with their default value where
|
42
|
+
# possible, but leave them commented. Uncommented options override the
|
43
|
+
# default value.
|
44
|
+
|
45
|
+
# If you want to change the port on a SELinux system, you have to tell
|
46
|
+
# SELinux about this change.
|
47
|
+
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
|
48
|
+
#
|
49
|
+
#Port 22
|
50
|
+
#AddressFamily any
|
51
|
+
#ListenAddress 0.0.0.0
|
52
|
+
#ListenAddress ::
|
53
|
+
|
54
|
+
# The default requires explicit activation of protocol 1
|
55
|
+
#Protocol 2
|
56
|
+
|
57
|
+
# HostKey for protocol version 1
|
58
|
+
#HostKey /etc/ssh/ssh_host_key
|
59
|
+
# HostKeys for protocol version 2
|
60
|
+
HostKey /etc/ssh/ssh_host_rsa_key
|
61
|
+
#HostKey /etc/ssh/ssh_host_dsa_key
|
62
|
+
HostKey /etc/ssh/ssh_host_ecdsa_key
|
63
|
+
HostKey /etc/ssh/ssh_host_ed25519_key
|
64
|
+
|
65
|
+
# Lifetime and size of ephemeral version 1 server key
|
66
|
+
#KeyRegenerationInterval 1h
|
67
|
+
#ServerKeyBits 1024
|
68
|
+
|
69
|
+
# Ciphers and keying
|
70
|
+
#RekeyLimit default none
|
71
|
+
|
72
|
+
# Logging
|
73
|
+
# obsoletes QuietMode and FascistLogging
|
74
|
+
#SyslogFacility AUTH
|
75
|
+
SyslogFacility AUTHPRIV
|
76
|
+
#LogLevel INFO
|
77
|
+
|
78
|
+
# Authentication:
|
79
|
+
|
80
|
+
#LoginGraceTime 2m
|
81
|
+
#PermitRootLogin yes
|
82
|
+
#StrictModes yes
|
83
|
+
#MaxAuthTries 6
|
84
|
+
#MaxSessions 10
|
85
|
+
|
86
|
+
#RSAAuthentication yes
|
87
|
+
#PubkeyAuthentication yes
|
88
|
+
|
89
|
+
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
|
90
|
+
# but this is overridden so installations will only check .ssh/authorized_keys
|
91
|
+
#AuthorizedKeysFile .ssh/authorized_keys
|
92
|
+
|
93
|
+
#AuthorizedPrincipalsFile none
|
94
|
+
|
95
|
+
#AuthorizedKeysCommand none
|
96
|
+
#AuthorizedKeysCommandUser nobody
|
97
|
+
|
98
|
+
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
|
99
|
+
#RhostsRSAAuthentication no
|
100
|
+
# similar for protocol version 2
|
101
|
+
#HostbasedAuthentication no
|
102
|
+
# Change to yes if you don't trust ~/.ssh/known_hosts for
|
103
|
+
# RhostsRSAAuthentication and HostbasedAuthentication
|
104
|
+
#IgnoreUserKnownHosts no
|
105
|
+
# Don't read the user's ~/.rhosts and ~/.shosts files
|
106
|
+
#IgnoreRhosts yes
|
107
|
+
|
108
|
+
# To disable tunneled clear text passwords, change to no here!
|
109
|
+
#PasswordAuthentication yes
|
110
|
+
#PermitEmptyPasswords no
|
111
|
+
PasswordAuthentication yes
|
112
|
+
|
113
|
+
# Change to no to disable s/key passwords
|
114
|
+
#ChallengeResponseAuthentication yes
|
115
|
+
ChallengeResponseAuthentication no
|
116
|
+
|
117
|
+
# Kerberos options
|
118
|
+
#KerberosAuthentication no
|
119
|
+
#KerberosOrLocalPasswd yes
|
120
|
+
#KerberosTicketCleanup yes
|
121
|
+
#KerberosGetAFSToken no
|
122
|
+
#KerberosUseKuserok yes
|
123
|
+
|
124
|
+
# GSSAPI options
|
125
|
+
GSSAPIAuthentication yes
|
126
|
+
GSSAPICleanupCredentials no
|
127
|
+
#GSSAPIStrictAcceptorCheck yes
|
128
|
+
#GSSAPIKeyExchange no
|
129
|
+
#GSSAPIEnablek5users no
|
130
|
+
|
131
|
+
# Set this to 'yes' to enable PAM authentication, account processing,
|
132
|
+
# and session processing. If this is enabled, PAM authentication will
|
133
|
+
# be allowed through the ChallengeResponseAuthentication and
|
134
|
+
# PasswordAuthentication. Depending on your PAM configuration,
|
135
|
+
# PAM authentication via ChallengeResponseAuthentication may bypass
|
136
|
+
# the setting of "PermitRootLogin without-password".
|
137
|
+
# If you just want the PAM account and session checks to run without
|
138
|
+
# PAM authentication, then enable this but set PasswordAuthentication
|
139
|
+
# and ChallengeResponseAuthentication to 'no'.
|
140
|
+
# WARNING: 'UsePAM no' is not supported in Red Hat Enterprise Linux and may cause several
|
141
|
+
# problems.
|
142
|
+
UsePAM yes
|
143
|
+
|
144
|
+
#AllowAgentForwarding yes
|
145
|
+
#AllowTcpForwarding yes
|
146
|
+
#GatewayPorts no
|
147
|
+
X11Forwarding yes
|
148
|
+
#X11DisplayOffset 10
|
149
|
+
#X11UseLocalhost yes
|
150
|
+
#PermitTTY yes
|
151
|
+
#PrintMotd yes
|
152
|
+
#PrintLastLog yes
|
153
|
+
#TCPKeepAlive yes
|
154
|
+
#UseLogin no
|
155
|
+
UsePrivilegeSeparation sandbox # Default for new installations.
|
156
|
+
#PermitUserEnvironment no
|
157
|
+
#Compression delayed
|
158
|
+
#ClientAliveInterval 0
|
159
|
+
#ClientAliveCountMax 3
|
160
|
+
#ShowPatchLevel no
|
161
|
+
#UseDNS yes
|
162
|
+
#PidFile /var/run/sshd.pid
|
163
|
+
#MaxStartups 10:30:100
|
164
|
+
#PermitTunnel no
|
165
|
+
#ChrootDirectory none
|
166
|
+
#VersionAddendum none
|
167
|
+
|
168
|
+
# no default banner path
|
169
|
+
#Banner none
|
170
|
+
|
171
|
+
# Accept locale-related environment variables
|
172
|
+
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
|
173
|
+
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
|
174
|
+
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
|
175
|
+
AcceptEnv XMODIFIERS
|
176
|
+
|
177
|
+
# override default of no subsystems
|
178
|
+
Subsystem sftp /usr/libexec/openssh/sftp-server
|
179
|
+
|
180
|
+
# Example of overriding settings on a per-user basis
|
181
|
+
#Match User anoncvs
|
182
|
+
# X11Forwarding no
|
183
|
+
# AllowTcpForwarding no
|
184
|
+
# PermitTTY no
|
185
|
+
# ForceCommand cvs server
|
186
|
+
```
|
1
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,14 +6,18 @@
|
|
6
6
|
SSHクライアントソフト(RLogin)を使用してサーバーに接続して
|
7
7
|
操作しています。
|
8
8
|
|
9
|
-
先日、FTPサーバーを構築する過程でSELinuxを無効化して
|
9
|
+
先日、FTPサーバーを構築する過程でSELinuxを無効化してOS(CentOS)を
|
10
|
+
rebootしました。
|
10
|
-
その際にSSHクライアントソフトの画面が急に真っ暗になり、
|
11
|
+
その際にSSHクライアントソフトの画面が急に真っ暗になり、RLoginを立ち上げ直して
|
11
|
-
試みても出来ませんでした。
|
12
|
+
再度接続を試みてもエラーが発生して出来ませんでした。(エラーの内容はメモして
|
13
|
+
いなかったため分かりません。すみません。。。今後は必ず記録するようにします。)
|
12
14
|
|
13
|
-
デスクトップPC、キーボード、マウスを持ってきてサーバーに繋げて
|
14
|
-
デスクトップPCから操作すると、再度SSHクライアントソフトから
|
15
|
-
接続
|
15
|
+
接続出来なかったのはSSHだけでした。
|
16
16
|
|
17
|
+
ディスプレイ(モニター)、キーボード、マウスを持ってきて、ディスプレイを
|
18
|
+
ディスプレイケーブルでサーバー(デスクトップPC本体)に繋げて画面から再起動の
|
19
|
+
操作をすると、再度SSHクライアントソフトから接続可能になりました。
|
20
|
+
|
17
21
|
SSH経由でサーバーに接続して再起動するとSSHの接続が途切れるのは
|
18
22
|
なぜでしょうか??
|
19
23
|
|