Hadoopを使用するためにホストファイルを編集し、いくつかの行(正しい動作を妨げる)を削除しました。を実行中にssh localhost
エラーが発生しました。
kex_exchange_identification: read: Connection reset by peer
構成:
hosts.allow
:sshd : ALL ALL : ALL
hosts.deny
:sshd: ALL
hosts
:## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost
ls -ld /etc /etc/ssh* /etc/ssh*/*
:lrwxr-xr-x@ 1 root wheel 11 1 янв 2020 /etc -> private/etc drwxrwxr-x 13 root wheel 416 2 окт 23:26 /etc/ssh -rwxrwxr-x 1 root wheel 577388 1 янв 2020 /etc/ssh/moduli -rwxrwxr-x 1 root wheel 1511 1 янв 2020 /etc/ssh/ssh_config -rwxrwxr-x 1 root wheel 1405 22 ноя 18:22 /etc/ssh/ssh_host_dsa_key -rwxrwxr-x 1 root wheel 620 22 ноя 18:22 /etc/ssh/ssh_host_dsa_key.pub -rwxrwxr-x 1 root wheel 525 22 ноя 18:23 /etc/ssh/ssh_host_ecdsa_key -rwxrwxr-x 1 root wheel 192 22 ноя 18:23 /etc/ssh/ssh_host_ecdsa_key.pub -rwxrwxr-x 1 root wheel 387 2 окт 23:26 /etc/ssh/ssh_host_ed25519_key -rwxrwxr-x 1 root wheel 82 2 окт 23:26 /etc/ssh/ssh_host_ed25519_key.pub -rwxrwxr-x 1 root wheel 2622 22 ноя 18:22 /etc/ssh/ssh_host_rsa_key -rwxrwxr-x 1 root wheel 584 22 ноя 18:22 /etc/ssh/ssh_host_rsa_key.pub -rwxrwxr-x 1 root wheel 3169 1 янв 2020 /etc/ssh/sshd_config
この問題をどのように解決しますか?本当にあなたの助けが必要です!絶望的です:(
ベストアンサー1
(少なくとも)ファイルに対する権限を破った/etc
のでssh
、もう機能しません。あなたの質問にリストされているファイルの正しい設定は次のとおりです。
lrwxr-xr-x@ 1 root wheel 11 1 Jan 2020 /etc -> private/etc
drwxr-xr-x 13 root wheel 416 22 Nov 12:22 /etc/ssh
-rw-r--r-- 1 root wheel 577388 1 Jan 2020 /etc/ssh/moduli
-rw-r--r-- 1 root wheel 1511 1 Jan 2020 /etc/ssh/ssh_config
-rw------- 1 root wheel 672 18 Jun 2018 /etc/ssh/ssh_host_dsa_key
-rw-r--r-- 1 root wheel 590 18 Jun 2018 /etc/ssh/ssh_host_dsa_key.pub
-rw------- 1 root wheel 227 18 Jun 2018 /etc/ssh/ssh_host_ecdsa_key
-rw-r--r-- 1 root wheel 162 18 Jun 2018 /etc/ssh/ssh_host_ecdsa_key.pub
-rw------- 1 root wheel 387 18 Jun 2018 /etc/ssh/ssh_host_ed25519_key
-rw-r--r-- 1 root wheel 82 18 Jun 2018 /etc/ssh/ssh_host_ed25519_key.pub
-rw------- 1 root wheel 1679 18 Jun 2018 /etc/ssh/ssh_host_rsa_key
-rw-r--r-- 1 root wheel 382 18 Jun 2018 /etc/ssh/ssh_host_rsa_key.pub
-rw-r--r-- 1 root wheel 3169 1 Jan 2020 /etc/ssh/sshd_config
私はあなたがこれよりも多くの権限を変更した可能性があると思います。
残念ながら、システムファイルの権限を変更する正しい方法について矛盾した不明な文書が見つかったので、次のサイトにアクセスすることをお勧めします。https://apple.stackexchange.com/そして、以前に修理権限に関する質問が提起され、回答されていることを確認してください。 (修正方法を具体的に尋ねる必要はありませんssh
。権限を変更すると問題が解決します。)