4 votes

sshd sur CyanogenMod 13 Nightly échoue sans explication

J'ai essayé de configurer sshd sur CM13, ce qui semble assez simple, mais ne semble pas vouloir fonctionner.

J'ai suivi le Article Wiki Doc : sshd mais lorsque j'exécute le 99sshd il produit l'avertissement suivant et les tentatives de connexion se bloquent indéfiniment.

Impossible de charger la clé de l'hôte : /data/ssh/ssh_host_dsa_key

J'ai essayé de décommenter le DEBUG=1 dans l'espoir de découvrir le problème, mais j'obtiens seulement ce qui suit de la part de logcat .

01-21 03:36:24.769 18044 18044 I sshd : debug1: sshd version OpenSSH_6.8, BoringSSL
01-21 03:36:24.771 18044 18044 I sshd : debug1: private host key #0: ssh-rsa SHA256:MMcwKtW+WxaCnIwPHMjHzgOjvdiNOBYPWOVpMKPUw+4
01-21 03:36:24.772 18044 18044 I sshd : debug1: key_load_private: incorrect passphrase supplied to decrypt private key
01-21 03:36:24.772 18044 18044 I sshd : Could not load host key: /data/ssh/ssh_host_dsa_key
01-21 03:36:24.772 18044 18044 I sshd : debug1: rexec_argv[0]='/system/bin/sshd'
01-21 03:36:24.772 18044 18044 I sshd : debug1: rexec_argv[1]='-f'
01-21 03:36:24.772 18044 18044 I sshd : debug1: rexec_argv[2]='/data/ssh/sshd_config'
01-21 03:36:24.773 18044 18044 I sshd : debug1: rexec_argv[3]='-D'
01-21 03:36:24.773 18044 18044 I sshd : debug1: rexec_argv[4]='-d'
01-21 03:36:24.773 18044 18044 I sshd : Set /proc/self/oom_score_adj from -1000 to -1000
01-21 03:36:24.773 18044 18044 I sshd : debug1: Bind to port 22 on ::.
01-21 03:36:24.774 18044 18044 I sshd : Server listening on :: port 22.
01-21 03:36:24.774 18044 18044 I sshd : debug1: Bind to port 22 on 0.0.0.0.
01-21 03:36:24.774 18044 18044 I sshd : Server listening on 0.0.0.0 port 22.

Il est fait mention de "key_load_private : incorrect passphrase supplied to decrypt private key", mais il n'est pas précisé pourquoi ni même s'il s'agit d'une erreur.

Il semble également que le Wiki ne soit pas à jour, puisque certaines opérations n'ont pas pu être effectuées exactement comme indiqué, comme le fait de pousser la clé publique.

J'ai également essayé de régénérer manuellement les clés RSA et DSA du serveur, mais aucun changement. Si je commente l'élément HostKey /data/ssh/ssh_host_dsa_key l'avertissement concernant la clé DSA n'apparaît plus, mais les tentatives de connexion sont toujours bloquées. J'ai également essayé ce qui suit ce Gist GitHub mais de même, cela ne fonctionne pas pour CM13.

Ma question est donc la suivante : que faut-il faire pour que le serveur SSH intégré à CyanogenMod fonctionne ? S'il vous plaît noter que je ne suis pas à la recherche de suggestions d'applications, et spécifiquement veulent éviter d'utiliser une certaine application SSH.


Voici le contenu de mon fichier de configuration et de mon script init.

sshd_config :

#   $OpenBSD: sshd_config,v 1.84 2011/05/23 03:30:07 djm Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.

#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# The default requires explicit activation of protocol 1
Protocol 2

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /data/ssh/ssh_host_rsa_key
HostKey /data/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#RSAAuthentication yes
PubkeyAuthentication yes

# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile  /data/ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
PermitEmptyPasswords no

# Change to no to disable s/key passwords
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM no

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
#ChrootDirectory none

# no default banner path
#Banner none

# override default of no subsystems
Subsystem sftp internal-sftp

# Example of overriding settings on a per-user basis
#Match User anoncvs
#   X11Forwarding no
#   AllowTcpForwarding no
#   ForceCommand cvs server

99sshd :

#!/system/bin/sh

umask 077

DEBUG=1

DSA_KEY=/data/ssh/ssh_host_dsa_key
DSA_PUB_KEY=/data/ssh/ssh_host_dsa_key.pub
RSA_KEY=/data/ssh/ssh_host_rsa_key
RSA_PUB_KEY=/data/ssh/ssh_host_rsa_key.pub
AUTHORIZED_KEYS=/data/ssh/authorized_keys
DEFAULT_AUTHORIZED_KEYS=/system/etc/security/authorized_keys.default

if [ ! -f $DSA_KEY ]; then
    /system/bin/ssh-keygen -t dsa -f $DSA_KEY -N ""
    chmod 600 /$DSA_KEY
    chmod 644 $DSA_PUB_KEY
fi

if [ ! -f $RSA_KEY ]; then
    /system/bin/ssh-keygen -t rsa -f $RSA_KEY -N ""
    chmod 600 /$RSA_KEY
    chmod 644 $RSA_PUB_KEY
fi

if [[ ! -f $AUTHORIZED_KEYS && -f $DEFAULT_AUTHORIZED_KEYS ]]; then
    cat $DEFAULT_AUTHORIZED_KEYS > $AUTHORIZED_KEYS
fi

if [ "1" == "$DEBUG" ] ; then
    # run sshd in debug mode and capture output to logcat
    /system/bin/logwrapper /system/bin/sshd -f /data/ssh/sshd_config -D -d
else
    # don't daemonize - otherwise we can't stop the sshd service
    /system/bin/sshd -f /data/ssh/sshd_config -D
fi

Mise à jour

A la suggestion d'augmenter la verbosité, voici la sortie de logcat quand je remplace /system/bin/logwrapper /system/bin/sshd -f /data/ssh/sshd_config -D -d con /system/bin/logwrapper /system/bin/sshd -f /data/ssh/sshd_config -D -ddd . Je ne sais pas trop pourquoi (j'ai redémarré depuis le dernier essai), mais il ne se bloque plus et il semble que lorsque j'essaie de me connecter, sshd se plante à la place.

Ajouté avant d'essayer de se connecter :

01-21 17:22:42.665  6908  6908 I sshd    : debug2: load_server_config: filename /data/ssh/sshd_config
01-21 17:22:42.669  6908  6908 I sshd    : debug2: load_server_config: done config len = 397
01-21 17:22:42.669  6908  6908 I sshd    : debug2: parse_server_config: config /data/ssh/sshd_config len 397
01-21 17:22:42.669  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:20 setting Protocol 2
01-21 17:22:42.669  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:25 setting HostKey /data/ssh/ssh_host_rsa_key
01-21 17:22:42.669  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:26 setting HostKey /data/ssh/ssh_host_dsa_key
01-21 17:22:42.669  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:40 setting PermitRootLogin no
01-21 17:22:42.669  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:46 setting PubkeyAuthentication yes
01-21 17:22:42.669  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:50 setting AuthorizedKeysFile /data/ssh/authorized_keys
01-21 17:22:42.670  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:63 setting PasswordAuthentication no
01-21 17:22:42.670  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:64 setting PermitEmptyPasswords no
01-21 17:22:42.670  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:67 setting ChallengeResponseAuthentication no
01-21 17:22:42.670  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:116 setting Subsystem sftp internal-sftp
01-21 17:22:42.670  6908  6908 I sshd    : debug1: sshd version OpenSSH_6.8, BoringSSL
01-21 17:22:42.673  6908  6908 I sshd    : debug1: private host key #0: ssh-rsa SHA256:mAYmJuHyM2tCsbXHleMvkLoobGIY5/9WCMe54bdHsiI
01-21 17:22:42.675  6908  6908 I sshd    : debug1: key_load_private: incorrect passphrase supplied to decrypt private key
01-21 17:22:42.675  6908  6908 I sshd    : Could not load host key: /data/ssh/ssh_host_dsa_key
01-21 17:22:42.675  6908  6908 I sshd    : debug1: rexec_argv[0]='/system/bin/sshd'
01-21 17:22:42.675  6908  6908 I sshd    : debug1: rexec_argv[1]='-f'
01-21 17:22:42.676  6908  6908 I sshd    : debug1: rexec_argv[2]='/data/ssh/sshd_config'
01-21 17:22:42.676  6908  6908 I sshd    : debug1: rexec_argv[3]='-D'
01-21 17:22:42.676  6908  6908 I sshd    : debug1: rexec_argv[4]='-ddd'
01-21 17:22:42.676  6908  6908 I sshd    : debug3: oom_adjust_setup
01-21 17:22:42.676  6908  6908 I sshd    : Set /proc/self/oom_score_adj from -1000 to -1000
01-21 17:22:42.676  6908  6908 I sshd    : debug2: fd 5 setting O_NONBLOCK
01-21 17:22:42.677  6908  6908 I sshd    : debug3: sock_set_v6only: set socket 5 IPV6_V6ONLY
01-21 17:22:42.677  6908  6908 I sshd    : debug1: Bind to port 22 on ::.
01-21 17:22:42.677  6908  6908 I sshd    : Server listening on :: port 22.
01-21 17:22:42.677  6908  6908 I sshd    : debug2: fd 6 setting O_NONBLOCK
01-21 17:22:42.677  6908  6908 I sshd    : debug1: Bind to port 22 on 0.0.0.0.
01-21 17:22:42.677  6908  6908 I sshd    : Server listening on 0.0.0.0 port 22.

Ajouté après avoir essayé de se connecter :

01-21 17:22:51.163  2648  4972 D NetlinkSocketObserver: NeighborEvent{elapsedMs=243550, 192.168.1.1, [60E327ADCC29], RTM_NEWNEIGH, NUD_STALE}
01-21 17:22:52.845  6908  6908 I sshd    : debug3: fd 7 is not O_NONBLOCK
01-21 17:22:52.845  6908  6908 I sshd    : debug1: Server will not fork when running in debugging mode.
01-21 17:22:52.846  6908  6908 I sshd    : debug3: send_rexec_state: entering fd = 10 config len 397
01-21 17:22:52.846  6908  6908 I sshd    : debug3: ssh_msg_send: type 0
01-21 17:22:52.846  6908  6908 I sshd    : debug3: send_rexec_state: done
01-21 17:22:52.846  6908  6908 I sshd    : debug1: rexec start in 7 out 7 newsock 7 pipe -1 sock 10
01-21 17:22:52.900  6909  6909 D /system/bin/sshd: debug3: recv_rexec_state: entering fd = 5
01-21 17:22:52.900  6909  6909 D /system/bin/sshd: debug3: ssh_msg_recv entering
01-21 17:22:52.900  6909  6909 D /system/bin/sshd: debug3: recv_rexec_state: done
01-21 17:22:52.900  6909  6909 D /system/bin/sshd: debug2: parse_server_config: config rexec len 397
01-21 17:22:52.900  6909  6909 D /system/bin/sshd: debug3: rexec:20 setting Protocol 2
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:25 setting HostKey /data/ssh/ssh_host_rsa_key
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:26 setting HostKey /data/ssh/ssh_host_dsa_key
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:40 setting PermitRootLogin no
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:46 setting PubkeyAuthentication yes
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:50 setting AuthorizedKeysFile /data/ssh/authorized_keys
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:63 setting PasswordAuthentication no
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:64 setting PermitEmptyPasswords no
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:67 setting ChallengeResponseAuthentication no
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:116 setting Subsystem sftp internal-sftp
01-21 17:22:52.902  6909  6909 D /system/bin/sshd: debug1: sshd version OpenSSH_6.8, BoringSSL
01-21 17:22:52.903  6909  6909 D /system/bin/sshd: debug1: private host key #0: ssh-rsa SHA256:mAYmJuHyM2tCsbXHleMvkLoobGIY5/9WCMe54bdHsiI
01-21 17:22:52.903  6909  6909 D /system/bin/sshd: debug1: key_load_private: incorrect passphrase supplied to decrypt private key
01-21 17:22:52.903  6909  6909 E /system/bin/sshd: error: Could not load host key: /data/ssh/ssh_host_dsa_key
01-21 17:22:52.903  6908  6908 I sshd    : debug1: inetd sockets after dupping: 5, 5
01-21 17:22:52.904  6908  6908 I sshd    : Connection from 192.168.1.224 port 49372 on 192.168.1.116 port 22
01-21 17:22:52.906  6908  6908 I sshd    : debug1: Client protocol version 2.0; client software version OpenSSH_6.2
01-21 17:22:52.906  6908  6908 I sshd    : debug1: match: OpenSSH_6.2 pat OpenSSH* compat 0x04000000
01-21 17:22:52.906  6908  6908 I sshd    : debug1: Enabling compatibility mode for protocol 2.0
01-21 17:22:52.906  6908  6908 I sshd    : debug1: Local version string SSH-2.0-OpenSSH_6.8
01-21 17:22:52.907  6908  6908 I sshd    : debug2: fd 5 setting O_NONBLOCK
01-21 17:22:52.909  6908  6908 I sshd    : debug2: Network child is on pid 6913
01-21 17:22:52.909  6908  6908 I sshd    : debug3: preauth child monitor started
01-21 17:22:52.918  6908  6908 I sshd    : debug3: privsep user:group 2000:2000 [preauth]
01-21 17:22:52.919  6908  6908 I sshd    : debug1: permanently_set_uid: 2000/2000 [preauth]
01-21 17:22:52.919  6908  6908 I sshd    : debug1: list_hostkey_types: ssh-rsa [preauth]
01-21 17:22:52.919  6908  6908 I sshd    : debug1: SSH2_MSG_KEXINIT sent [preauth]
01-21 17:22:52.920  6908  6908 I sshd    : debug1: SSH2_MSG_KEXINIT received [preauth]
01-21 17:22:52.920  6908  6908 I sshd    : debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 [preauth]
01-21 17:22:52.921  6908  6908 I sshd    : debug2: kex_parse_kexinit: ssh-rsa [preauth]
01-21 17:22:52.921  6908  6908 I sshd    : debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com [preauth]
01-21 17:22:52.922  6908  6908 I sshd    : debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com [preauth]
01-21 17:22:52.922  6908  6908 I sshd    : debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
01-21 17:22:52.923  6908  6908 I sshd    : debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
01-21 17:22:52.923  6908  6908 I sshd    : debug2: kex_parse_kexinit: none,zlib@openssh.com [preauth]
01-21 17:22:52.923  6908  6908 I sshd    : debug2: kex_parse_kexinit: none,zlib@openssh.com [preauth]
01-21 17:22:52.924  6908  6908 I sshd    : debug2: kex_parse_kexinit:  [preauth]
01-21 17:22:52.924  6908  6908 I sshd    : debug2: kex_parse_kexinit:  [preauth]
01-21 17:22:52.924  6908  6908 I sshd    : debug2: kex_parse_kexinit: first_kex_follows 0  [preauth]
01-21 17:22:52.925  6908  6908 I sshd    : debug2: kex_parse_kexinit: reserved 0  [preauth]
01-21 17:22:52.925  6908  6908 I sshd    : debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 [preauth]
01-21 17:22:52.926  6908  6908 I sshd    : debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss [preauth]
01-21 17:22:52.926  6908  6908 I sshd    : debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se [preauth]
01-21 17:22:52.926  6908  6908 I sshd    : debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se [preauth]
01-21 17:22:52.927  6908  6908 I sshd    : debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 [preauth]
01-21 17:22:52.927  6908  6908 I sshd    : debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 [preauth]
01-21 17:22:52.928  6908  6908 I sshd    : debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib [preauth]
01-21 17:22:52.928  6908  6908 I sshd    : debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib [preauth]
01-21 17:22:52.928  6908  6908 I sshd    : debug2: kex_parse_kexinit:  [preauth]
01-21 17:22:52.929  6908  6908 I sshd    : debug2: kex_parse_kexinit:  [preauth]
01-21 17:22:52.929  6908  6908 I sshd    : debug2: kex_parse_kexinit: first_kex_follows 0  [preauth]
01-21 17:22:52.929  6908  6908 I sshd    : debug2: kex_parse_kexinit: reserved 0  [preauth]
01-21 17:22:52.930  6908  6908 I sshd    : debug1: kex: client->server aes128-ctr hmac-sha1-etm@openssh.com none [preauth]
01-21 17:22:52.930  6908  6908 I sshd    : debug1: kex: server->client aes128-ctr hmac-sha1-etm@openssh.com none [preauth]
01-21 17:22:52.931  6908  6908 I sshd    : debug1: expecting SSH2_MSG_KEX_DH_GEX_REQUEST [preauth]
01-21 17:22:52.931  6908  6908 I sshd    : debug1: SSH2_MSG_KEX_DH_GEX_REQUEST received [preauth]
01-21 17:22:52.931  6908  6908 I sshd    : debug3: mm_request_send entering: type 0 [preauth]
01-21 17:22:52.932  6908  6908 I sshd    : debug3: mm_choose_dh: waiting for MONITOR_ANS_MODULI [preauth]
01-21 17:22:52.933  6908  6908 I sshd    : debug3: mm_request_receive_expect entering: type 1 [preauth]
01-21 17:22:52.933  6908  6908 I sshd    : debug3: mm_request_receive entering [preauth]
01-21 17:22:52.933  6908  6908 I sshd    : debug3: mm_request_receive entering
01-21 17:22:52.933  6908  6908 I sshd    : debug3: monitor_read: checking request 0
01-21 17:22:52.934  6908  6908 I sshd    : debug3: mm_answer_moduli: got parameters: 1024 2048 8192
01-21 17:22:52.934  6908  6908 I sshd    : WARNING: /data/ssh/moduli does not exist, using fixed modulus
01-21 17:22:52.935  6908  6908 I sshd    : debug3: mm_request_send entering: type 1
01-21 17:22:52.937  6908  6908 I sshd    : debug2: monitor_read: 0 used once, disabling now
01-21 17:22:52.937  2200  2200 I DEBUG   : property debug.db.uid not set; NOT waiting for gdb.
01-21 17:22:52.938  2200  2200 I DEBUG   : HINT: adb shell setprop debug.db.uid 100000
01-21 17:22:52.938  2200  2200 I DEBUG   : HINT: adb forward tcp:5039 tcp:5039
01-21 17:22:52.938  6908  6908 I sshd    : debug3: mm_choose_dh: remaining 0 [preauth]
01-21 17:22:52.938  6908  6908 I sshd    : debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent [preauth]
01-21 17:22:53.168  2200  2200 I SELinux : SELinux: Loaded file_contexts contexts from /file_contexts.
01-21 17:22:53.174  2648  3182 W NativeCrashListener: Couldn't find ProcessRecord for pid 6913
--------- beginning of crash
01-21 17:22:53.174  2200  2200 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-21 17:22:53.174  2200  2200 E DEBUG   : AM write failed: Broken pipe
01-21 17:22:53.174  2200  2200 F DEBUG   : Build fingerprint: 'google/shamu/shamu:6.0.1/MMB29S/2489379:user/release-keys'
01-21 17:22:53.174  2200  2200 F DEBUG   : Revision: '0'
01-21 17:22:53.174  2200  2200 F DEBUG   : ABI: 'arm'
01-21 17:22:53.174  2200  2200 F DEBUG   : pid: 6913, tid: 6913, name: sshd  >>> /system/bin/sshd: [net] <<<
01-21 17:22:53.174  2200  2200 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
01-21 17:22:53.177  2200  2200 F DEBUG   :     r0 00000000  r1 00001b01  r2 00000006  r3 00000000
01-21 17:22:53.177  2200  2200 F DEBUG   :     r4 b6f36b88  r5 00000006  r6 b6f36b38  r7 0000010c
01-21 17:22:53.177  2200  2200 F DEBUG   :     r8 000016a4  r9 b6e3cf34  sl fffffe88  fp b6f6a9d8
01-21 17:22:53.177  2200  2200 F DEBUG   :     ip 0000000d  sp becbf2f8  lr b6c8e42d  pc b6c90b90  cpsr 200f0010
01-21 17:22:53.190  2200  2200 F DEBUG   :
01-21 17:22:53.190  2200  2200 F DEBUG   : backtrace:
01-21 17:22:53.190  2200  2200 F DEBUG   :     #00 pc 00049b90  /system/lib/libc.so (tgkill+12)
01-21 17:22:53.190  2200  2200 F DEBUG   :     #01 pc 00047429  /system/lib/libc.so (pthread_kill+36)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #02 pc 0001bbc3  /system/lib/libc.so (raise+10)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #03 pc 0001846d  /system/lib/libc.so (__libc_android_abort+36)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #04 pc 000164cc  /system/lib/libc.so (abort+4)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #05 pc 00061e0d  /system/lib/libcrypto.so
01-21 17:22:53.191  2200  2200 F DEBUG   :     #06 pc 00061c89  /system/lib/libcrypto.so (RAND_bytes+276)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #07 pc 0004143f  /system/lib/libcrypto.so (BN_rand+50)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #08 pc 0004b5d3  /system/lib/libcrypto.so
01-21 17:22:53.191  2200  2200 F DEBUG   :     #09 pc 00024d25  /system/lib/libssh.so (dh_gen_key+44)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #10 pc 0000cdc9  /system/bin/sshd
01-21 17:22:53.191  2200  2200 F DEBUG   :     #11 pc 000253d5  /system/lib/libssh.so (ssh_dispatch_run+232)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #12 pc 00025491  /system/lib/libssh.so (ssh_dispatch_run_fatal+4)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #13 pc 00020d6f  /system/bin/sshd
01-21 17:22:53.191  2200  2200 F DEBUG   :     #14 pc 000162f5  /system/lib/libc.so (__libc_init+52)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #15 pc 000073e4  /system/bin/sshd
01-21 17:22:53.230  2200  2200 F DEBUG   :
01-21 17:22:53.230  2200  2200 F DEBUG   : Tombstone written to: /data/tombstones/tombstone_07
01-21 17:22:53.232  6908  6908 I sshd    : debug1: monitor_read_log: child log fd closed
01-21 17:22:53.232  6908  6908 I sshd    : debug3: mm_request_receive entering
01-21 17:22:53.233  6908  6908 I sshd    : mm_request_receive: socket closed
01-21 17:22:53.233  6908  6908 I sshd    : debug1: do_cleanup
01-21 17:22:53.233  6908  6908 I sshd    : debug1: Killing privsep child 6913
01-21 17:22:53.238  6908  6908 I sshd    : sshd terminated by exit(255)

1voto

Chris B. Points 21
Could not load host key: /data/ssh/ssh_host_dsa_key

Ce n'est pas une erreur fatale, mais un avertissement. Comme vous l'avez déjà trouvé, vous pouvez vous en débarrasser en commentant HostKey de votre sshd_config .

01-21 03:36:24.774 18044 18044 I sshd : Server listening on 0.0.0.0 port 22.

Que voulez-vous que le serveur fasse ? Il attend votre connexion.

mais les tentatives de connexion sont toujours bloquées.

Pourriez-vous vous donner la peine de poster les logs du serveur et du client et comment vous vous connectez ? De préférence, le client avec -vvv commutateurs et serveur avec -ddd au lieu de seulement -d comme dans le script.

Excusez-moi de ne pas répondre à toutes vos questions, mais il y en a trop, pas assez d'informations et ce format ne conviendrait pas à un commentaire.

androidalle.com

AndroidAlle est une communauté de androiders où vous pouvez résoudre vos problèmes et vos doutes. Vous pouvez consulter les questions des autres sysadmins, poser vos propres questions ou résoudre celles des autres.

Powered by:

X