質問編集履歴

5

内容修正

2020/10/14 00:05

投稿

syosinnsya_
syosinnsya_

スコア5

test CHANGED
File without changes
test CHANGED
@@ -417,139 +417,3 @@
417
417
  # ForceCommand cvs server
418
418
 
419
419
  ```
420
-
421
-
422
-
423
- ###cat /etc/nsswitch.conf(10月14日 追記)
424
-
425
- ```
426
-
427
- [root@localhost ~]# cat /etc/nsswitch.conf
428
-
429
- #
430
-
431
- # /etc/nsswitch.conf
432
-
433
- #
434
-
435
- # An example Name Service Switch config file. This file should be
436
-
437
- # sorted with the most-used services at the beginning.
438
-
439
- #
440
-
441
- # The entry '[NOTFOUND=return]' means that the search for an
442
-
443
- # entry should stop if the search in the previous entry turned
444
-
445
- # up nothing. Note that if the search failed due to some other reason
446
-
447
- # (like no NIS server responding) then the search continues with the
448
-
449
- # next entry.
450
-
451
- #
452
-
453
- # Valid entries include:
454
-
455
- #
456
-
457
- # nisplus Use NIS+ (NIS version 3)
458
-
459
- # nis Use NIS (NIS version 2), also called YP
460
-
461
- # dns Use DNS (Domain Name Service)
462
-
463
- # files Use the local files
464
-
465
- # db Use the local database (.db) files
466
-
467
- # compat Use NIS on compat mode
468
-
469
- # hesiod Use Hesiod for user lookups
470
-
471
- # [NOTFOUND=return] Stop searching if not found so far
472
-
473
- #
474
-
475
-
476
-
477
- # To use db, put the "db" in front of "files" for entries you want to be
478
-
479
- # looked up first in the databases
480
-
481
- #
482
-
483
- # Example:
484
-
485
- #passwd: db files nisplus nis
486
-
487
- #shadow: db files nisplus nis
488
-
489
- #group: db files nisplus nis
490
-
491
-
492
-
493
- passwd: files sss
494
-
495
- shadow: files sss
496
-
497
- group: files sss
498
-
499
- #initgroups: files
500
-
501
-
502
-
503
- #hosts: db files nisplus nis dns
504
-
505
- hosts: files dns
506
-
507
-
508
-
509
- # Example - obey only what nisplus tells us...
510
-
511
- #services: nisplus [NOTFOUND=return] files
512
-
513
- #networks: nisplus [NOTFOUND=return] files
514
-
515
- #protocols: nisplus [NOTFOUND=return] files
516
-
517
- #rpc: nisplus [NOTFOUND=return] files
518
-
519
- #ethers: nisplus [NOTFOUND=return] files
520
-
521
- #netmasks: nisplus [NOTFOUND=return] files
522
-
523
-
524
-
525
- bootparams: nisplus [NOTFOUND=return] files
526
-
527
-
528
-
529
- ethers: files
530
-
531
- netmasks: files
532
-
533
- networks: files
534
-
535
- protocols: files
536
-
537
- rpc: files
538
-
539
- services: files sss
540
-
541
-
542
-
543
- netgroup: files sss
544
-
545
-
546
-
547
- publickey: nisplus
548
-
549
-
550
-
551
- automount: files sss
552
-
553
- aliases: files nisplus
554
-
555
- ```

4

情報追加

2020/10/14 00:05

投稿

syosinnsya_
syosinnsya_

スコア5

test CHANGED
File without changes
test CHANGED
@@ -417,3 +417,139 @@
417
417
  # ForceCommand cvs server
418
418
 
419
419
  ```
420
+
421
+
422
+
423
+ ###cat /etc/nsswitch.conf(10月14日 追記)
424
+
425
+ ```
426
+
427
+ [root@localhost ~]# cat /etc/nsswitch.conf
428
+
429
+ #
430
+
431
+ # /etc/nsswitch.conf
432
+
433
+ #
434
+
435
+ # An example Name Service Switch config file. This file should be
436
+
437
+ # sorted with the most-used services at the beginning.
438
+
439
+ #
440
+
441
+ # The entry '[NOTFOUND=return]' means that the search for an
442
+
443
+ # entry should stop if the search in the previous entry turned
444
+
445
+ # up nothing. Note that if the search failed due to some other reason
446
+
447
+ # (like no NIS server responding) then the search continues with the
448
+
449
+ # next entry.
450
+
451
+ #
452
+
453
+ # Valid entries include:
454
+
455
+ #
456
+
457
+ # nisplus Use NIS+ (NIS version 3)
458
+
459
+ # nis Use NIS (NIS version 2), also called YP
460
+
461
+ # dns Use DNS (Domain Name Service)
462
+
463
+ # files Use the local files
464
+
465
+ # db Use the local database (.db) files
466
+
467
+ # compat Use NIS on compat mode
468
+
469
+ # hesiod Use Hesiod for user lookups
470
+
471
+ # [NOTFOUND=return] Stop searching if not found so far
472
+
473
+ #
474
+
475
+
476
+
477
+ # To use db, put the "db" in front of "files" for entries you want to be
478
+
479
+ # looked up first in the databases
480
+
481
+ #
482
+
483
+ # Example:
484
+
485
+ #passwd: db files nisplus nis
486
+
487
+ #shadow: db files nisplus nis
488
+
489
+ #group: db files nisplus nis
490
+
491
+
492
+
493
+ passwd: files sss
494
+
495
+ shadow: files sss
496
+
497
+ group: files sss
498
+
499
+ #initgroups: files
500
+
501
+
502
+
503
+ #hosts: db files nisplus nis dns
504
+
505
+ hosts: files dns
506
+
507
+
508
+
509
+ # Example - obey only what nisplus tells us...
510
+
511
+ #services: nisplus [NOTFOUND=return] files
512
+
513
+ #networks: nisplus [NOTFOUND=return] files
514
+
515
+ #protocols: nisplus [NOTFOUND=return] files
516
+
517
+ #rpc: nisplus [NOTFOUND=return] files
518
+
519
+ #ethers: nisplus [NOTFOUND=return] files
520
+
521
+ #netmasks: nisplus [NOTFOUND=return] files
522
+
523
+
524
+
525
+ bootparams: nisplus [NOTFOUND=return] files
526
+
527
+
528
+
529
+ ethers: files
530
+
531
+ netmasks: files
532
+
533
+ networks: files
534
+
535
+ protocols: files
536
+
537
+ rpc: files
538
+
539
+ services: files sss
540
+
541
+
542
+
543
+ netgroup: files sss
544
+
545
+
546
+
547
+ publickey: nisplus
548
+
549
+
550
+
551
+ automount: files sss
552
+
553
+ aliases: files nisplus
554
+
555
+ ```

3

情報追加

2020/10/13 23:56

投稿

syosinnsya_
syosinnsya_

スコア5

test CHANGED
File without changes
test CHANGED
@@ -56,6 +56,54 @@
56
56
 
57
57
 
58
58
 
59
+ ###/bin/systemctl status sshd.service
60
+
61
+ IPアドレスを一部隠しています。
62
+
63
+ ```
64
+
65
+ [root@localhost ~]# /bin/systemctl status sshd.service
66
+
67
+ ● sshd.service - OpenSSH server daemon
68
+
69
+ Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
70
+
71
+ Active: active (running) since 木 2020-09-03 13:43:24 JST; 1 months 9 days ago
72
+
73
+ Docs: man:sshd(8)
74
+
75
+ man:sshd_config(5)
76
+
77
+ Main PID: 1427 (sshd)
78
+
79
+ CGroup: /system.slice/sshd.service
80
+
81
+ └─1427 /usr/sbin/sshd -D
82
+
83
+
84
+
85
+ 10月 13 09:08:21 localhost.localdomain sshd[4877]: Accepted password for root from 192.168.xx.xx port 55275 ssh2
86
+
87
+ 10月 13 09:09:49 localhost.localdomain sshd[4929]: Accepted password for root from 192.168.xx.xx port 55281 ssh2
88
+
89
+ 10月 13 09:10:02 localhost.localdomain sshd[4959]: Accepted password for root from 192.168.xx.xx port 55282 ssh2
90
+
91
+ 10月 13 09:14:00 localhost.localdomain sshd[5051]: Accepted password for root from 192.168.xx.xx port 55290 ssh2
92
+
93
+ 10月 13 09:20:17 localhost.localdomain sshd[5189]: Accepted password for root from 192.168.xx.xx port 55301 ssh2
94
+
95
+ 10月 13 13:55:58 localhost.localdomain sshd[10262]: Accepted password for root from 192.168.xx.xx port 56939 ssh2
96
+
97
+ 10月 13 15:04:18 localhost.localdomain sshd[11562]: Accepted password for root from 192.168.xx.xx port 57131 ssh2
98
+
99
+ 10月 13 15:10:10 localhost.localdomain sshd[11693]: Accepted password for root from 192.168.xx.xx port 57148 ssh2
100
+
101
+ 10月 13 15:55:36 localhost.localdomain sshd[12538]: Accepted password for root from 192.168.xx.xx port 57574 ssh2
102
+
103
+ 10月 13 16:03:59 localhost.localdomain sshd[12727]: Accepted password for root from 192.168.xx.xx port 57772 ssh2
104
+
105
+ ```
106
+
59
107
  ###sshd_config
60
108
 
61
109
  ```

2

情報追加

2020/10/13 07:18

投稿

syosinnsya_
syosinnsya_

スコア5

test CHANGED
File without changes
test CHANGED
@@ -53,3 +53,319 @@
53
53
  もし解る方がいらっしゃいましたら教えていただけますと幸いです。
54
54
 
55
55
  よろしくお願い致します。
56
+
57
+
58
+
59
+ ###sshd_config
60
+
61
+ ```
62
+
63
+ [root@localhost ~]# cat /etc/ssh/sshd_config
64
+
65
+ # $OpenBSD: sshd_config,v 1.93 2014/01/10 05:59:19 djm Exp $
66
+
67
+
68
+
69
+ # This is the sshd server system-wide configuration file. See
70
+
71
+ # sshd_config(5) for more information.
72
+
73
+
74
+
75
+ # This sshd was compiled with PATH=/usr/local/bin:/usr/bin
76
+
77
+
78
+
79
+ # The strategy used for options in the default sshd_config shipped with
80
+
81
+ # OpenSSH is to specify options with their default value where
82
+
83
+ # possible, but leave them commented. Uncommented options override the
84
+
85
+ # default value.
86
+
87
+
88
+
89
+ # If you want to change the port on a SELinux system, you have to tell
90
+
91
+ # SELinux about this change.
92
+
93
+ # semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
94
+
95
+ #
96
+
97
+ #Port 22
98
+
99
+ #AddressFamily any
100
+
101
+ #ListenAddress 0.0.0.0
102
+
103
+ #ListenAddress ::
104
+
105
+
106
+
107
+ # The default requires explicit activation of protocol 1
108
+
109
+ #Protocol 2
110
+
111
+
112
+
113
+ # HostKey for protocol version 1
114
+
115
+ #HostKey /etc/ssh/ssh_host_key
116
+
117
+ # HostKeys for protocol version 2
118
+
119
+ HostKey /etc/ssh/ssh_host_rsa_key
120
+
121
+ #HostKey /etc/ssh/ssh_host_dsa_key
122
+
123
+ HostKey /etc/ssh/ssh_host_ecdsa_key
124
+
125
+ HostKey /etc/ssh/ssh_host_ed25519_key
126
+
127
+
128
+
129
+ # Lifetime and size of ephemeral version 1 server key
130
+
131
+ #KeyRegenerationInterval 1h
132
+
133
+ #ServerKeyBits 1024
134
+
135
+
136
+
137
+ # Ciphers and keying
138
+
139
+ #RekeyLimit default none
140
+
141
+
142
+
143
+ # Logging
144
+
145
+ # obsoletes QuietMode and FascistLogging
146
+
147
+ #SyslogFacility AUTH
148
+
149
+ SyslogFacility AUTHPRIV
150
+
151
+ #LogLevel INFO
152
+
153
+
154
+
155
+ # Authentication:
156
+
157
+
158
+
159
+ #LoginGraceTime 2m
160
+
161
+ #PermitRootLogin yes
162
+
163
+ #StrictModes yes
164
+
165
+ #MaxAuthTries 6
166
+
167
+ #MaxSessions 10
168
+
169
+
170
+
171
+ #RSAAuthentication yes
172
+
173
+ #PubkeyAuthentication yes
174
+
175
+
176
+
177
+ # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
178
+
179
+ # but this is overridden so installations will only check .ssh/authorized_keys
180
+
181
+ #AuthorizedKeysFile .ssh/authorized_keys
182
+
183
+
184
+
185
+ #AuthorizedPrincipalsFile none
186
+
187
+
188
+
189
+ #AuthorizedKeysCommand none
190
+
191
+ #AuthorizedKeysCommandUser nobody
192
+
193
+
194
+
195
+ # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
196
+
197
+ #RhostsRSAAuthentication no
198
+
199
+ # similar for protocol version 2
200
+
201
+ #HostbasedAuthentication no
202
+
203
+ # Change to yes if you don't trust ~/.ssh/known_hosts for
204
+
205
+ # RhostsRSAAuthentication and HostbasedAuthentication
206
+
207
+ #IgnoreUserKnownHosts no
208
+
209
+ # Don't read the user's ~/.rhosts and ~/.shosts files
210
+
211
+ #IgnoreRhosts yes
212
+
213
+
214
+
215
+ # To disable tunneled clear text passwords, change to no here!
216
+
217
+ #PasswordAuthentication yes
218
+
219
+ #PermitEmptyPasswords no
220
+
221
+ PasswordAuthentication yes
222
+
223
+
224
+
225
+ # Change to no to disable s/key passwords
226
+
227
+ #ChallengeResponseAuthentication yes
228
+
229
+ ChallengeResponseAuthentication no
230
+
231
+
232
+
233
+ # Kerberos options
234
+
235
+ #KerberosAuthentication no
236
+
237
+ #KerberosOrLocalPasswd yes
238
+
239
+ #KerberosTicketCleanup yes
240
+
241
+ #KerberosGetAFSToken no
242
+
243
+ #KerberosUseKuserok yes
244
+
245
+
246
+
247
+ # GSSAPI options
248
+
249
+ GSSAPIAuthentication yes
250
+
251
+ GSSAPICleanupCredentials no
252
+
253
+ #GSSAPIStrictAcceptorCheck yes
254
+
255
+ #GSSAPIKeyExchange no
256
+
257
+ #GSSAPIEnablek5users no
258
+
259
+
260
+
261
+ # Set this to 'yes' to enable PAM authentication, account processing,
262
+
263
+ # and session processing. If this is enabled, PAM authentication will
264
+
265
+ # be allowed through the ChallengeResponseAuthentication and
266
+
267
+ # PasswordAuthentication. Depending on your PAM configuration,
268
+
269
+ # PAM authentication via ChallengeResponseAuthentication may bypass
270
+
271
+ # the setting of "PermitRootLogin without-password".
272
+
273
+ # If you just want the PAM account and session checks to run without
274
+
275
+ # PAM authentication, then enable this but set PasswordAuthentication
276
+
277
+ # and ChallengeResponseAuthentication to 'no'.
278
+
279
+ # WARNING: 'UsePAM no' is not supported in Red Hat Enterprise Linux and may cause several
280
+
281
+ # problems.
282
+
283
+ UsePAM yes
284
+
285
+
286
+
287
+ #AllowAgentForwarding yes
288
+
289
+ #AllowTcpForwarding yes
290
+
291
+ #GatewayPorts no
292
+
293
+ X11Forwarding yes
294
+
295
+ #X11DisplayOffset 10
296
+
297
+ #X11UseLocalhost yes
298
+
299
+ #PermitTTY yes
300
+
301
+ #PrintMotd yes
302
+
303
+ #PrintLastLog yes
304
+
305
+ #TCPKeepAlive yes
306
+
307
+ #UseLogin no
308
+
309
+ UsePrivilegeSeparation sandbox # Default for new installations.
310
+
311
+ #PermitUserEnvironment no
312
+
313
+ #Compression delayed
314
+
315
+ #ClientAliveInterval 0
316
+
317
+ #ClientAliveCountMax 3
318
+
319
+ #ShowPatchLevel no
320
+
321
+ #UseDNS yes
322
+
323
+ #PidFile /var/run/sshd.pid
324
+
325
+ #MaxStartups 10:30:100
326
+
327
+ #PermitTunnel no
328
+
329
+ #ChrootDirectory none
330
+
331
+ #VersionAddendum none
332
+
333
+
334
+
335
+ # no default banner path
336
+
337
+ #Banner none
338
+
339
+
340
+
341
+ # Accept locale-related environment variables
342
+
343
+ AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
344
+
345
+ AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
346
+
347
+ AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
348
+
349
+ AcceptEnv XMODIFIERS
350
+
351
+
352
+
353
+ # override default of no subsystems
354
+
355
+ Subsystem sftp /usr/libexec/openssh/sftp-server
356
+
357
+
358
+
359
+ # Example of overriding settings on a per-user basis
360
+
361
+ #Match User anoncvs
362
+
363
+ # X11Forwarding no
364
+
365
+ # AllowTcpForwarding no
366
+
367
+ # PermitTTY no
368
+
369
+ # ForceCommand cvs server
370
+
371
+ ```

1

情報追加

2020/10/13 07:07

投稿

syosinnsya_
syosinnsya_

スコア5

test CHANGED
File without changes
test CHANGED
@@ -14,19 +14,27 @@
14
14
 
15
15
 
16
16
 
17
- 先日、FTPサーバーを構築する過程でSELinuxを無効化してrebootしました。
17
+ 先日、FTPサーバーを構築する過程でSELinuxを無効化してOS(CentOS)を
18
18
 
19
- その際にSSHクライアントソフトの画面が急に真っ暗になり、再度接続を
19
+ rebootしました。
20
20
 
21
+ その際にSSHクライアントソフトの画面が急に真っ暗になり、RLoginを立ち上げ直して
22
+
21
- 試みても出来ませんでした。
23
+ 再度接続を試みてもエラーが発生して出来ませんでした。(エラーの内容はメモして
24
+
25
+ いなかったため分かりません。すみません。。。今後は必ず記録するようにします。)
22
26
 
23
27
 
24
28
 
25
- デスクトップPC、キーボード、マウスを持てきてサーバーに繋げて
29
+ 接続出来なかたのはSSHだけでした。
26
30
 
27
- デスクトップPCから操作すると、再度SSHクライアントソフトから
28
31
 
32
+
33
+ ディスプレイ(モニター)、キーボード、マウスを持ってきて、ディスプレイを
34
+
35
+ ディスプレイケーブルでサーバー(デスクトップPC本体)に繋げて画面から再起動の
36
+
29
- 接続可能になりました。
37
+ 操作をすると、再度SSHクライアントソフトから接続可能になりました。
30
38
 
31
39
 
32
40