Ssh with changed user password

Hi Toradex support,

We’re having an issue which the sshd server and authentication using username/password authentication. Authentication use pub/private key is working like charm but we want to use username/password as an alternative. Authenication locally using the debug (rs232 connector) also works correctly. I tested this on v2.6beta1 (Toradex console image) using a yocto/openembedded build. The following message appears in the sshd log when running it stand-alone in debug mode:

root@colibri-imx6:~# /usr/sbin/sshd -d -p 2222
debug1: sshd version OpenSSH_7.1, OpenSSL 1.0.2d 9 Jul 2015
debug1: private host key #0: ssh-rsa SHA256:q9rXJCB64QykbMWu9tiCQLNfBoYynD6oWWS1zOaf4Nw
debug1: private host key #1: ssh-dss SHA256:XfPkkr2xwt4fRdx2fJVRUs8o4VXUif/sI0iAJAfavqw
debug1: key_load_private: No such file or directory
debug1: key_load_public: No such file or directory
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
debug1: key_load_private: No such file or directory
debug1: key_load_public: No such file or directory
Could not load host key: /etc/ssh/ssh_host_ed25519_key
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
debug1: rexec_argv[2]='-p'
debug1: rexec_argv[3]='2222'
debug1: Set /proc/self/oom_score_adj from 0 to -1000
debug1: Bind to port 2222 on 0.0.0.0.
Server listening on 0.0.0.0 port 2222.
debug1: Bind to port 2222 on ::.
Server listening on :: port 2222.
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
debug1: inetd sockets after dupping: 3, 3
Connection from 192.168.10.3 port 49349 on 192.168.10.2 port 2222
debug1: Client protocol version 2.0; client software version PuTTY_Release_0.67
debug1: no match: PuTTY_Release_0.67
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.1
debug1: permanently_set_uid: 994/991 [preauth]
debug1: list_hostkey_types: ssh-rsa [preauth]
debug1: SSH2_MSG_KEXINIT sent [preauth]
debug1: SSH2_MSG_KEXINIT received [preauth]
debug1: kex: client->server aes256-ctr hmac-sha2-256 none [preauth]
debug1: kex: server->client aes256-ctr hmac-sha2-256 none [preauth]
debug1: expecting SSH2_MSG_KEX_DH_GEX_REQUEST [preauth]
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST received [preauth]
debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent [preauth]
debug1: expecting SSH2_MSG_KEX_DH_GEX_INIT [preauth]
debug1: SSH2_MSG_NEWKEYS sent [preauth]
debug1: expecting SSH2_MSG_NEWKEYS [preauth]
debug1: SSH2_MSG_NEWKEYS received [preauth]
debug1: KEX done [preauth]
debug1: userauth-request for user root service ssh-connection method none [preauth]
debug1: attempt 0 failures 0 [preauth]
debug1: PAM: initializing for "root"
debug1: PAM: setting PAM_RHOST to "192.168.10.3"
debug1: PAM: setting PAM_TTY to "ssh"
debug1: PAM: password authentication failed for root: Authentication failure
Failed none for root from 192.168.10.3 port 49349 ssh2
debug1: userauth-request for user root service ssh-connection method keyboard-interactive [preauth]
debug1: attempt 1 failures 0 [preauth]
debug1: keyboard-interactive devs  [preauth]
debug1: auth2_challenge: user=root devs= [preauth]
debug1: kbdint_alloc: devices 'pam' [preauth]
debug1: auth2_challenge_start: trying authentication method 'pam' [preauth]
Postponed keyboard-interactive for root from 192.168.10.3 port 49349 ssh2 [preauth]
debug1: do_pam_account: called
debug1: PAM: num PAM env strings 0
Postponed keyboard-interactive/pam for root from 192.168.10.3 port 49349 ssh2 [preauth]
debug1: do_pam_account: called
Accepted keyboard-interactive/pam for root from 192.168.10.3 port 49349 ssh2
debug1: monitor_child_preauth: root has been authenticated by privileged process
debug1: monitor_read_log: child log fd closed
debug1: PAM: establishing credentials
PAM: pam_setcred(): Failure setting user credentials
debug1: do_cleanup

Can you help us out with this issue?

Hi

Does the following fix the issues?

Change the following in /etc/ssh/sshd_config

change from:

#PasswordAuthentication no                                            
PermitEmptyPasswords yes 

to:

PasswordAuthentication yes                                            
#PermitEmptyPasswords yes 

Max

Confirmed this works