Creo que he roto los permisos para (al menos) los archivos en /etc, y es por eso que ssh ya no funciona. hosts.allow:
sshd : ALL
ALL : ALL
hosts.deny:
sshd: ALL
anfitriones:
##
# 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
salida de ssh localhost:
kex_exchange_identification: read: Connection reset by peer
Connection reset by ::1 port 22
salida de 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
sudo /usr/sbin/sshd -dD:
debug1: sshd version OpenSSH_8.6, LibreSSL 2.8.3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0775 for '/etc/ssh/ssh_host_rsa_key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
debug1: Unable to load host key "/etc/ssh/ssh_host_rsa_key": bad permissions
debug1: Unable to load host key: /etc/ssh/ssh_host_rsa_key
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0775 for '/etc/ssh/ssh_host_ecdsa_key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
debug1: Unable to load host key "/etc/ssh/ssh_host_ecdsa_key": bad permissions
debug1: Unable to load host key: /etc/ssh/ssh_host_ecdsa_key
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0775 for '/etc/ssh/ssh_host_ed25519_key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
debug1: Unable to load host key "/etc/ssh/ssh_host_ed25519_key": bad permissions
debug1: Unable to load host key: /etc/ssh/ssh_host_ed25519_key
sshd: no hostkeys available -- exiting.
sudo ssh ::1 -vvv:
OpenSSH_8.6p1, LibreSSL 2.8.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
debug1: /etc/ssh/ssh_config line 54: Applying options for *
debug2: resolve_canonicalize: hostname ::1 is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/Users/sava/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/Users/sava/.ssh/known_hosts2'
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug3: ssh_connect_direct: entering
debug1: Connecting to ::1 [::1] port 22.
debug3: set_sock_tos: set socket 3 IPV6_TCLASS 0x48
debug1: Connection established.
debug1: identity file /Users/sava/.ssh/id_rsa type 0
debug1: identity file /Users/sava/.ssh/id_rsa-cert type -1
debug1: identity file /Users/sava/.ssh/id_dsa type -1
debug1: identity file /Users/sava/.ssh/id_dsa-cert type -1
debug1: identity file /Users/sava/.ssh/id_ecdsa type -1
debug1: identity file /Users/sava/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/sava/.ssh/id_ecdsa_sk type -1
debug1: identity file /Users/sava/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /Users/sava/.ssh/id_ed25519 type -1
debug1: identity file /Users/sava/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/sava/.ssh/id_ed25519_sk type -1
debug1: identity file /Users/sava/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /Users/sava/.ssh/id_xmss type -1
debug1: identity file /Users/sava/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.6
kex_exchange_identification: read: Connection reset by peer
Connection reset by ::1 port 22
¿Cómo puedo arreglar esto? ¡Realmente necesito su ayuda! Estoy desesperada :(