Anuncio:

Conoce a los Colaboradores Destacados de la Comunidad Oficial de Soporte de Apple en español
Son apasionados de la tecnología. Tienen un conocimiento profundo de productos y del ecosistema de Apple
Son gente única que les encanta resolver problemas
Disfrutan compartiendo lo que saben y ayudando a otras personas como tú

Videos de consejos y trucos de soporte de Apple especialmente para ti en Apple YouTube.
Suscríbete al Apple YouTube España, Apple YouTube Mexico, Apple YouTube Colombia, Apple YouTube Chile.
Cómo tomar fotos con el iPhone

Parece que nadie ha participado en esta conversación desde hace mucho tiempo. Para empezar una conversación, haz una nueva pregunta.

Pregunta:

Pregunta: Imposibilidad de acceder via SSH desde otro Mac

En principio, siempre he podido acceder via ssh desde todos mis equipos locales, a el imac.


Desde el otro dia recibo un mensaje:


debug2: we sent a publickey packet, wait for reply
Authentication failed


Investigando, ya que tengo claro que la key es corecta revise el log de sshd en el iMac.

cat /var/log/system.log | grep sshd
May  1 16:34:06 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.08CBDEC5-F668-4AE2-B754-26C95478162B[3384]): Service exited with abnormal code: 255
May  1 16:35:05 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.D4422E1F-1A80-4FAE-8029-18B3BB68703C[3410]): Service exited with abnormal code: 255
May  1 16:36:55 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.0C386073-8128-401C-8F15-EF9C71A234A4[3476]): Service exited with abnormal code: 255
May  1 16:37:30 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.8A20EE1F-0895-4182-902F-0FCB9CCAA7A1[3484]): Service exited with abnormal code: 255
May  1 16:38:45 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.B4CA7459-68C5-4E6C-813E-EFAF8677CA8B[3538]): Service exited with abnormal code: 255
May  1 16:46:12 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.E3CBAF98-31B6-4CBA-8D90-06E642E2D743[3774]): Service exited with abnormal code: 255
May  1 16:46:46 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.968EB3D0-AAB1-46D1-B357-60D888AD7664[3820]): Service exited with abnormal code: 255
May  1 16:46:54 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.5CC5A2AD-0A53-4D58-92E8-5D3C5E624F0E[3823]): Service exited with abnormal code: 255
May  1 16:47:00 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.14BEF7AC-7F73-415F-8D20-C2ED5F7CCAE4[3826]): Service exited with abnormal code: 255
May  1 16:47:05 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.5339CF71-0619-47EB-B82C-26E92CB1A1F7[3829]): Service exited with abnormal code: 255
May  1 16:48:13 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.A0F2DFE5-75C4-4673-B6D0-24D69120CA45[3864]): Service exited with abnormal code: 255
May  1 16:48:29 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.0C3F527B-8278-4FC3-A9B9-98056B41B43C[3870]): Service exited with abnormal code: 255
May  1 16:52:30 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.0DF61FC6-4A93-48C6-BF5B-8407D1AB83C4[3944]): Service exited with abnormal code: 255
May  1 16:54:18 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.7A81F205-4D3F-472C-846F-F8EC77E8220E[3983]): Service exited with abnormal code: 255
May  1 16:58:03 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.B76F0DE2-A0A0-4258-A2B9-299B806E8D5F[4398]): Service exited with abnormal code: 255
May  1 16:59:08 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.BAF59C99-0A05-4675-BAA7-913442F881B2[4434]): Service exited with abnormal code: 255
May  1 17:11:23 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.B8885235-D0E5-4A5C-86CC-E5C608BDC3C3[4638]): Service exited with abnormal code: 255
May  1 18:30:24 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd.C023A7E3-2310-419E-90C5-0402ECEA6A9D[6503]): Service exited with abnormal code: 255


Asi que puse el tail y pare e inicie el servidor

sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd


tail -f /var/log/system.log | grep sshd
May  1 21:06:03 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd[9957]): Service exited with abnormal code: 255

M 1 21:06:03 iMac-2 com.apple.xpc.launchd[1] (com.openssh.sshd[9957]): Service exited with abnormal code: 25


Que puede estar ocurriendo?

iMac, Mac OS X (10.7.5)

Publicado el

Responder

El contenido de la página fue cargado

2/05/2018 02:46 AM en respuesta a abkrim En respuesta a abkrim

Ampliando datos.


Si revisamos que no este el demonio activo, y tratamos de cargar en modo debug el demonio, nos indica el problema de que el puerto esta en uso, pero no se ve uso uso... 😕


➜  ~ sudo launchctl stop com.openssh.sshd
➜  ~ ps aux|grep -i ssh
abkrim            1997   0,0  0,0  4268760    876 s001  S+    8:31AM   0:00.03 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn sshd
abkrim            3464   0,0  0,0  4267736    536 s002  R+    9:43AM   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn -i ssh
➜  ~ netstat -a -b|grep 22
tcp4       0      0  192.168.1.69.50229     stackoverflow.co.https ESTABLISHED       1984       4309
tcp4       0      0  192.168.1.69.49391     mad07s09-in-f10..https CLOSE_WAIT       31928       2722
tcp4       0      0  192.168.1.69.49375     wl-in-f125.1e100.jabbe ESTABLISHED       7103     221795
tcp4       0      0  192.168.1.69.49235     17.188.138.70.5223     ESTABLISHED       4589       3293
tcp4       0      0  192.168.1.69.49168     17.188.161.27.5223     ESTABLISHED       6288      10509
tcp6       0      0  *.1022                 *.*                    LISTEN               0          0
tcp4       0      0  localhost.57440        localhost.59987        TIME_WAIT        22872          0
tcp4       0      0  localhost.57453        localhost.59987        TIME_WAIT        22872          0
tcp4       0      0  localhost.57462        localhost.59987        TIME_WAIT        22872          0
tcp4       0      0  192.168.1.69.57154     mad07s10-in-f10..https TIME_WAIT         3307       1622
tcp4       0      0  localhost.57471        localhost.59987        TIME_WAIT        22872          0
653156c2d98141fd stream      0      0                0 653156c2d9813af5                0                0 /var/folders/05/_xy84yn97x50sj004y72rg580000gp/T/vscode-372c4dba36649cd65ea4591ceb962b22091a8ba7.sock
653156c2d2ad5515 stream      0      0 653156c2d0372e45                0                0                0 /var/folders/05/_xy84yn97x50sj004y72rg580000gp/T/vscode-372c4dba36649cd65ea4591ceb962b22091a8ba7.sock
653156c2d2ad80d5 stream      0      0                0 653156c2d2ad819d                0                0 /Users/abkrim/Library/Application Support/Code/1.22.2-shared.sock
653156c2d2ad7905 stream      0      0                0 653156c2d2ad5f3d                0                0 /Users/abkrim/Library/Application Support/Code/1.22.2-shared.sock
653156c2d2ad79cd stream      0      0 653156c2d5447dcd                0                0                0 /Users/abkrim/Library/Application Support/Code/1.22.2-shared.sock
653156c2d175051d stream      0      0 653156c2d201d875                0                0                0 /Users/abkrim/Library/Application Support/Code/1.22.2-main.sock
653156c2c69d45dd stream      0      0 653156c2ce0c6cd5                0                0                0 /var/folders/05/_xy84yn97x50sj004y72rg580000gp/T/36296B3265067C321004C484D7E6DD8A92276C5D.srv
653156c2c9f7c6a5 stream      0      0 653156c2c5938225                0                0                0 /var/tmp/filesystemui.socket
kevt       0      0      1      6      1     12224          0
kctl       0      0        224        144     12      9 com.apple.netsrc
kctl       0      0        224        144     13      9 com.apple.netsrc
kctl       0      0        896        576     22      9 com.apple.netsrc
kctl       0      0        224        144     46      9 com.apple.netsrc
➜  ~sudo /usr/sbin/sshd -ddd
debug2: load_server_config: filename /etc/ssh/sshd_config
debug2: load_server_config: done config len = 290
debug2: parse_server_config: config /etc/ssh/sshd_config len 290
debug3: /etc/ssh/sshd_config:42 setting AuthorizedKeysFile .ssh/authorized_keys
debug3: /etc/ssh/sshd_config:58 setting PasswordAuthentication yes
debug3: /etc/ssh/sshd_config:83 setting UsePAM yes
debug3: /etc/ssh/sshd_config:108 setting AcceptEnv LANG LC_*
debug3: /etc/ssh/sshd_config:114 setting Subsystem sftp /usr/libexec/sftp-server
debug3: /etc/ssh/sshd_config:124 setting XAuthLocation /opt/X11/bin/xauth
debug1: sshd version OpenSSH_7.6, LibreSSL 2.6.2
debug1: private host key #0: ssh-rsa SHA256:Pyv2GkZBE5DYoepXu5yWZ4Y+QAEoPzuU56EisU1D5rI
debug1: private host key #1: ssh-dss SHA256:GY5LotzDXNJ7nXuryDS5HehCcpBgYDieJbIbUnzBU/c
debug1: private host key #2: ecdsa-sha2-nistp256 SHA256:sXVosdAMvhsJ6H17TSIVVRq/fWmo5YG6EHyKm9ARWaw
debug1: private host key #3: ssh-ed25519 SHA256:toO00XtxCi+zs7CU1KE0cHpJ3QvO+YSIlVxnkq8rnaE
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-ddd'
debug2: fd 4 setting O_NONBLOCK
debug3: sock_set_v6only: set socket 4 IPV6_V6ONLY
debug1: Bind to port 22 on ::.
Bind to port 22 on :: failed: Address already in use.
debug2: fd 4 setting O_NONBLOCK
debug1: Bind to port 22 on 0.0.0.0.
Bind to port 22 on 0.0.0.0 failed: Address already in use.
Cannot bind any address.

2/05/2018 02:46 AM

Responder Útil
Perfil de usuario para usuario: abkrim

Pregunta: Imposibilidad de acceder via SSH desde otro Mac