質問編集履歴

1

詳細の追加

2020/05/01 05:52

投稿

ryu2142
ryu2142

スコア18

test CHANGED
File without changes
test CHANGED
@@ -85,3 +85,187 @@
85
85
  me@MacBookAir ~ %
86
86
 
87
87
  ```
88
+
89
+
90
+
91
+ 追記
92
+
93
+
94
+
95
+ > yukky1201様
96
+
97
+
98
+
99
+ サーバーへ公開鍵を登録した手順は、
100
+
101
+ 1.クライアントOS(Mac)でホームディレクトリに.sshディレクトリを作成
102
+
103
+ 2..sshディレクトリにてssh-keygenを実行しキーペアを作成
104
+
105
+ 3.サーバーOS(centOS)の一般ユーザー(vpsuser)のホームディレクトリに.sshディレクトリを作成
106
+
107
+ 4.クライアントOSからscpでid_rsa.pubをauthorized_keysという名前でサーバーOS側の.sshに転送
108
+
109
+ 5.必要なpermissionの設定をchmodで全て完了
110
+
111
+ という流れです。
112
+
113
+
114
+
115
+ > angel_p_57様
116
+
117
+
118
+
119
+ permission不備の確認のため、パスワード認証を有効にしssh -vでのログイン実行しました。
120
+
121
+ 以下のように表示されました。
122
+
123
+ ```ここに言語を入力
124
+
125
+ me@MacBookAir ~ % ssh -v vpsuser@xxx.xx.xx.xx
126
+
127
+ OpenSSH_8.1p1, LibreSSL 2.7.3
128
+
129
+ debug1: Reading configuration data /etc/ssh/ssh_config
130
+
131
+ debug1: /etc/ssh/ssh_config line 47: Applying options for *
132
+
133
+ debug1: Connecting to xxx.xx.xx.xx [xxx.xx.xx.xx] port 22.
134
+
135
+ debug1: Connection established.
136
+
137
+ debug1: identity file /Users/me/.ssh/id_rsa type 0
138
+
139
+ debug1: identity file /Users/me/.ssh/id_rsa-cert type -1
140
+
141
+ debug1: identity file /Users/me/.ssh/id_dsa type -1
142
+
143
+ debug1: identity file /Users/me/.ssh/id_dsa-cert type -1
144
+
145
+ debug1: identity file /Users/me/.ssh/id_ecdsa type -1
146
+
147
+ debug1: identity file /Users/me/.ssh/id_ecdsa-cert type -1
148
+
149
+ debug1: identity file /Users/me/.ssh/id_ed25519 type -1
150
+
151
+ debug1: identity file /Users/me/.ssh/id_ed25519-cert type -1
152
+
153
+ debug1: identity file /Users/me/.ssh/id_xmss type -1
154
+
155
+ debug1: identity file /Users/me/.ssh/id_xmss-cert type -1
156
+
157
+ debug1: Local version string SSH-2.0-OpenSSH_8.1
158
+
159
+ debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
160
+
161
+ debug1: match: OpenSSH_7.4 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
162
+
163
+ debug1: Authenticating to xxx.xx.xx.xx:22 as 'vpsuser'
164
+
165
+ debug1: SSH2_MSG_KEXINIT sent
166
+
167
+ debug1: SSH2_MSG_KEXINIT received
168
+
169
+ debug1: kex: algorithm: curve25519-sha256
170
+
171
+ debug1: kex: host key algorithm: ecdsa-sha2-nistp256
172
+
173
+ debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
174
+
175
+ debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
176
+
177
+ debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
178
+
179
+ debug1: Server host key: ecdsa-sha2-nistp256 SHA256:O5rjMSVgOtd9w9KDInCQPi2dE/SIczfZWci81fCeniQ
180
+
181
+ debug1: Host 'xxx.xx.xx.xx' is known and matches the ECDSA host key.
182
+
183
+ debug1: Found key in /Users/me/.ssh/known_hosts:1
184
+
185
+ debug1: rekey out after 134217728 blocks
186
+
187
+ debug1: SSH2_MSG_NEWKEYS sent
188
+
189
+ debug1: expecting SSH2_MSG_NEWKEYS
190
+
191
+ debug1: SSH2_MSG_NEWKEYS received
192
+
193
+ debug1: rekey in after 134217728 blocks
194
+
195
+ debug1: Will attempt key: /Users/me/.ssh/id_rsa RSA SHA256:UBU5Zm+lmOkiTOCYv4QxjDiZzkFmmVKLIvM6g9i3jVo
196
+
197
+ debug1: Will attempt key: /Users/me/.ssh/id_dsa
198
+
199
+ debug1: Will attempt key: /Users/me/.ssh/id_ecdsa
200
+
201
+ debug1: Will attempt key: /Users/me/.ssh/id_ed25519
202
+
203
+ debug1: Will attempt key: /Users/me/.ssh/id_xmss
204
+
205
+ debug1: SSH2_MSG_EXT_INFO received
206
+
207
+ debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
208
+
209
+ debug1: SSH2_MSG_SERVICE_ACCEPT received
210
+
211
+ debug1: Authentications that can continue: publickey,password
212
+
213
+ debug1: Next authentication method: publickey
214
+
215
+ debug1: Offering public key: /Users/me/.ssh/id_rsa RSA SHA256:UBU5Zm+lmOkiTOCYv4QxjDiZzkFmmVKLIvM6g9i3jVo
216
+
217
+ debug1: Authentications that can continue: publickey,password
218
+
219
+ debug1: Trying private key: /Users/me/.ssh/id_dsa
220
+
221
+ debug1: Trying private key: /Users/me/.ssh/id_ecdsa
222
+
223
+ debug1: Trying private key: /Users/me/.ssh/id_ed25519
224
+
225
+ debug1: Trying private key: /Users/me/.ssh/id_xmss
226
+
227
+ debug1: Next authentication method: password
228
+
229
+ vpsuser@xxx.xx.xx.xx's password:
230
+
231
+ debug1: Authentication succeeded (password).
232
+
233
+ Authenticated to xxx.xx.xx.xx ([xxx.xx.xx.xx]:22).
234
+
235
+ debug1: channel 0: new [client-session]
236
+
237
+ debug1: Requesting no-more-sessions@openssh.com
238
+
239
+ debug1: Entering interactive session.
240
+
241
+ debug1: pledge: network
242
+
243
+ debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
244
+
245
+ debug1: Remote: Ignored authorized keys: bad ownership or modes for directory /home/vpsuser/.ssh
246
+
247
+ debug1: Sending environment.
248
+
249
+ debug1: Sending env LANG = ja_JP.UTF-8
250
+
251
+ Last login: Fri May 1 14:26:51 2020 from softbank126147178223.bbtec.net
252
+
253
+
254
+
255
+ SAKURA Internet [Virtual Private Server SERVICE]
256
+
257
+
258
+
259
+ [vpsuser@tk2-212-15534 ~]$
260
+
261
+ ```
262
+
263
+
264
+
265
+ また、ssh-keygen -y -f ~/.ssh/id_rsa を実行して、id_rsa.pubファイルと内容が一致するかを確認しましたが、きちんと一致しておりました。
266
+
267
+ Match条件について確認しましたが、sshd_configを見る限りそれでは無さそうです、、。
268
+
269
+
270
+
271
+ どうぞよろしくお願いします。