質問編集履歴
5
パスの記載間違いを修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -66,7 +66,7 @@
|
|
66
66
|
|
67
67
|
#鍵を転送
|
68
68
|
|
69
|
-
ssh-copy-id -i /
|
69
|
+
ssh-copy-id -i /var/hoge/.ssh/id_rsa.pub hoge@localhost
|
70
70
|
|
71
71
|
|
72
72
|
|
@@ -90,7 +90,7 @@
|
|
90
90
|
|
91
91
|
・ネットワーク上のIPアドレス
|
92
92
|
|
93
|
-
- `/
|
93
|
+
- `/var/hoge/.ssh/`配下の`authorized_keys`と`known_hosts`の各ファイルの内容を確認したところ、正しいと思える内容が追記されていました。
|
94
94
|
|
95
95
|
※4つのサーバ指定が全て記載されていた
|
96
96
|
|
4
sshをデバッグモードで実行した際の出力を追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -148,6 +148,124 @@
|
|
148
148
|
|
149
149
|
|
150
150
|
|
151
|
+
- `ssh`コマンドに`-v`スイッチを付けてデバッグモードで実行してみました。
|
152
|
+
|
153
|
+
しかし何故パスワード認証に移行してしまうのかが分かりません…
|
154
|
+
|
155
|
+
```
|
156
|
+
|
157
|
+
[hoge@backup-t ~]$ ssh -v localhost
|
158
|
+
|
159
|
+
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
|
160
|
+
|
161
|
+
debug1: Reading configuration data /etc/ssh/ssh_config
|
162
|
+
|
163
|
+
debug1: Applying options for *
|
164
|
+
|
165
|
+
debug1: Connecting to localhost [::1] port 22.
|
166
|
+
|
167
|
+
debug1: Connection established.
|
168
|
+
|
169
|
+
debug1: identity file /var/hoge/.ssh/identity type -1
|
170
|
+
|
171
|
+
debug1: identity file /var/hoge/.ssh/identity-cert type -1
|
172
|
+
|
173
|
+
debug1: identity file /var/hoge/.ssh/id_rsa type 1
|
174
|
+
|
175
|
+
debug1: identity file /var/hoge/.ssh/id_rsa-cert type -1
|
176
|
+
|
177
|
+
debug1: identity file /var/hoge/.ssh/id_dsa type -1
|
178
|
+
|
179
|
+
debug1: identity file /var/hoge/.ssh/id_dsa-cert type -1
|
180
|
+
|
181
|
+
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
|
182
|
+
|
183
|
+
debug1: match: OpenSSH_5.3 pat OpenSSH*
|
184
|
+
|
185
|
+
debug1: Enabling compatibility mode for protocol 2.0
|
186
|
+
|
187
|
+
debug1: Local version string SSH-2.0-OpenSSH_5.3
|
188
|
+
|
189
|
+
debug1: SSH2_MSG_KEXINIT sent
|
190
|
+
|
191
|
+
debug1: SSH2_MSG_KEXINIT received
|
192
|
+
|
193
|
+
debug1: kex: server->client aes128-ctr hmac-md5 none
|
194
|
+
|
195
|
+
debug1: kex: client->server aes128-ctr hmac-md5 none
|
196
|
+
|
197
|
+
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
|
198
|
+
|
199
|
+
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
|
200
|
+
|
201
|
+
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
|
202
|
+
|
203
|
+
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
|
204
|
+
|
205
|
+
debug1: Host 'localhost' is known and matches the RSA host key.
|
206
|
+
|
207
|
+
debug1: Found key in /var/hoge/.ssh/known_hosts:2
|
208
|
+
|
209
|
+
debug1: ssh_rsa_verify: signature correct
|
210
|
+
|
211
|
+
debug1: SSH2_MSG_NEWKEYS sent
|
212
|
+
|
213
|
+
debug1: expecting SSH2_MSG_NEWKEYS
|
214
|
+
|
215
|
+
debug1: SSH2_MSG_NEWKEYS received
|
216
|
+
|
217
|
+
debug1: SSH2_MSG_SERVICE_REQUEST sent
|
218
|
+
|
219
|
+
debug1: SSH2_MSG_SERVICE_ACCEPT received
|
220
|
+
|
221
|
+
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
|
222
|
+
|
223
|
+
debug1: Next authentication method: gssapi-keyex
|
224
|
+
|
225
|
+
debug1: No valid Key exchange context
|
226
|
+
|
227
|
+
debug1: Next authentication method: gssapi-with-mic
|
228
|
+
|
229
|
+
debug1: Unspecified GSS failure. Minor code may provide more information
|
230
|
+
|
231
|
+
Credentials cache file '/tmp/krb5cc_500' not found
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
debug1: Unspecified GSS failure. Minor code may provide more information
|
236
|
+
|
237
|
+
Credentials cache file '/tmp/krb5cc_500' not found
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
debug1: Unspecified GSS failure. Minor code may provide more information
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
debug1: Unspecified GSS failure. Minor code may provide more information
|
248
|
+
|
249
|
+
Credentials cache file '/tmp/krb5cc_500' not found
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
debug1: Next authentication method: publickey
|
254
|
+
|
255
|
+
debug1: Trying private key: /var/hoge/.ssh/identity
|
256
|
+
|
257
|
+
debug1: Offering public key: /var/hoge/.ssh/id_rsa
|
258
|
+
|
259
|
+
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
|
260
|
+
|
261
|
+
debug1: Trying private key: /var/hoge/.ssh/id_dsa
|
262
|
+
|
263
|
+
debug1: Next authentication method: password
|
264
|
+
|
265
|
+
```
|
266
|
+
|
267
|
+
|
268
|
+
|
151
269
|
---
|
152
270
|
|
153
271
|
恐れ入りますが、どなたかお知恵をお貸しいただければと思います。
|
3
ログのファイル名を間違えました。あと試したことを追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -102,6 +102,8 @@
|
|
102
102
|
|
103
103
|
※`PermitRootLogin`を変更した以外はデフォルト
|
104
104
|
|
105
|
+
- あえて`/etc/ssh/sshd_config`の`RSAAuthentication`と`PubkeyAuthentication`を有効にして`yes`を指定してみましたが、ダメでした。
|
106
|
+
|
105
107
|
- サーバの再起動もしました。変化ありません…
|
106
108
|
|
107
109
|
|
@@ -124,7 +126,7 @@
|
|
124
126
|
|
125
127
|
|
126
128
|
|
127
|
-
- `/var/log/
|
129
|
+
- `/var/log/secure`の出力内容は以下の通りです。
|
128
130
|
|
129
131
|
鍵見に行ってない…
|
130
132
|
|
2
messageログの出力内容を追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -108,7 +108,7 @@
|
|
108
108
|
|
109
109
|
### 補足情報
|
110
110
|
|
111
|
-
`.ssh`ディレクトリ配下の各ファイルのアクセス権は以下の通りです。
|
111
|
+
- `.ssh`ディレクトリ配下の各ファイルのアクセス権は以下の通りです。
|
112
112
|
|
113
113
|
```
|
114
114
|
|
@@ -124,6 +124,28 @@
|
|
124
124
|
|
125
125
|
|
126
126
|
|
127
|
+
- `/var/log/messages`の出力内容は以下の通りです。
|
128
|
+
|
129
|
+
鍵見に行ってない…
|
130
|
+
|
131
|
+
```
|
132
|
+
|
133
|
+
Nov 9 16:01:42 backup-t su: pam_unix(su-l:session): session opened for user hoge by root(uid=0)
|
134
|
+
|
135
|
+
Nov 9 16:01:54 backup-t sshd[3512]: Accepted password for hoge from ::1 port 40532 ssh2
|
136
|
+
|
137
|
+
Nov 9 16:01:54 backup-t sshd[3512]: pam_unix(sshd:session): session opened for user hoge by (uid=0)
|
138
|
+
|
139
|
+
Nov 9 16:01:57 backup-t sshd[3516]: Received disconnect from ::1: 11: disconnected by user
|
140
|
+
|
141
|
+
Nov 9 16:01:57 backup-t sshd[3512]: pam_unix(sshd:session): session closed for user hoge
|
142
|
+
|
143
|
+
Nov 9 16:01:59 backup-t su: pam_unix(su-l:session): session closed for user hoge
|
144
|
+
|
145
|
+
```
|
146
|
+
|
147
|
+
|
148
|
+
|
127
149
|
---
|
128
150
|
|
129
151
|
恐れ入りますが、どなたかお知恵をお貸しいただければと思います。
|
1
初心者マークを付け忘れました…
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|