Correção do SSH (cliente e servidor) no Mac OS X Mountain Lion

1

Eu atualizei meu Mac para o Mountain Lion. Agora que está completo, não consigo conectar o SSH em nenhum servidor por mais de alguns segundos, e não consigo receber nenhuma conexão SSH.

Só posso supor que algo da atualização tenha causado o problema. O que posso fazer para diagnosticar o erro e corrigi-lo? Eu gostaria de me conectar a outros sistemas usando o nome de usuário jjasonclark e gostaria que outros se conectassem ao meu sistema com o nome de usuário remotepair .

Eu não tenho nenhum registro sobre o ssh em /var/log/system.log . Eu não tenho um arquivo chamado /var/log/secure.log . E grep ing através de syslog -d /var/log/asl para ssh mostra apenas as vezes em que editei o arquivo /etc/sshd_config .

Quando outras pessoas tentarem se conectar a mim (com a opção -vvv ), o cliente ficará nessa mensagem.

debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP

Exemplo de conexão da minha máquina para os outros ssh -vvv jjasonclark.analoganalytics.com

OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /usr/local/Cellar/openssh/5.9p1/etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to jjasonclark.analoganalytics.com [184.106.115.234] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/Users/jjasonclark/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /Users/jjasonclark/.ssh/id_rsa type 1
debug1: identity file /Users/jjasonclark/.ssh/id_rsa-cert type -1
debug1: identity file /Users/jjasonclark/.ssh/id_dsa type -1
debug1: identity file /Users/jjasonclark/.ssh/id_dsa-cert type -1
debug1: identity file /Users/jjasonclark/.ssh/id_ecdsa type -1
debug1: identity file /Users/jjasonclark/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH_4*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "jjasonclark.analoganalytics.com" from file "/Users/jjasonclark/.ssh/known_hosts"
debug3: load_hostkeys: found key type RSA in file /Users/jjasonclark/.ssh/known_hosts:37
debug3: load_hostkeys: found key type RSA in file /Users/jjasonclark/.ssh/known_hosts:38
debug3: load_hostkeys: loaded 2 keys
debug3: order_hostkeyalgs: prefer hostkeyalgs: [email protected],[email protected],ssh-rsa
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: [email protected],[email protected],ssh-rsa,[email protected],[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,[email protected],zlib
debug2: kex_parse_kexinit: none,[email protected],zlib
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,[email protected]
debug2: kex_parse_kexinit: none,[email protected]
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP

Meu /etc/syslog.conf

# Note that flat file logs are now configured in /etc/asl.conf

install.*                                               @127.0.0.1:32376

Meu /etc/sshd_config

Protocol 2
SyslogFacility AUTHPRIV
LogLevel INFO
PermitRootLogin no
PubkeyAuthentication yes
PasswordAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
ClientAliveInterval 120
ClientAliveCountMax 3
AcceptEnv LANG LC_*
AllowUsers jjasonclark remotepair

Meu /etc/ssh_config

Host *
    SendEnv LANG LC_*
    ServerAliveInterval 60
    
por Jason 22.08.2012 / 02:55

1 resposta

1

Resolvido!

Foi estranho resolver esse problema. Aconteceu que eu precisava redefinir minha PRAM. Deve ter armazenado alguns detalhes que precisavam ser alterados com a atualização.

A Apple tem um artigo sobre como redefinir a PRAM . Você reinicia e mantém cmd + opt + p + r até ouvir a segunda vez.

    
por 22.08.2012 / 19:02

Tags