1

I'm a total noob when it comes to the Pi, so please bear with me, and apologies if I'm slow...

I have Raspbian Stretch installed on my Pi 3 b+ and I've installed OMV as well. I'm using it in headless mode as I don't currently have a USB keyboard.

Until recently, all was going well, and no issues. However, I have just installed Kodi, and I am now unable to log in; I've tried different methods (SSH, Telnet, WinSCP, etc), but always hit the same issue. The install went OK and completed successfully, but when I tried to run it...nothing happened. So, I rebooted the Pi and ever since then, I've not been able to connect (although OMV still works and I can connect OK with that).

So when attempting to connect via SSH (from Windows 10 PC), I get:

Permission denied, please try again.

The password is definitely correct and I've confirmed the IP address is also connect (can ping OK).

If I run SSH in verbose mode, I get the following:

C:\Users\<username>>ssh -vvv pi@192.168.0.56
OpenSSH_for_Windows_7.6p1, LibreSSL 2.6.4
debug3: Failed to open file:C:\\Users\\<username>/.ssh/config error:2
debug3: Failed to open file:C:\\ProgramData\\ssh/ssh_config error:2
debug2: resolving "192.168.0.56" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 192.168.0.56 [192.168.0.56] port 22.
debug1: Connection established.
debug3: Failed to open file:C:\\Users\\<username>/.ssh/id_rsa error:2
debug3: Failed to open file:C:\\Users\\<username>/.ssh/id_rsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\<username>/.ssh/id_rsa type -1
debug3: Failed to open file:C:\\Users\\<username>/.ssh/id_rsa-cert error:2
debug3: Failed to open file:C:\\Users\\<username>/.ssh/id_rsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\<username>/.ssh/id_rsa-cert type -1
debug3: Failed to open file:C:\\Users\\<username>/.ssh/id_dsa error:2
debug3: Failed to open file:C:\\Users\\<username>/.ssh/id_dsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\<username>/.ssh/id_dsa type -1
debug3: Failed to open file:C:\\Users\\<username>/.ssh/id_dsa-cert error:2
debug3: Failed to open file:C:\\Users\\<username>/.ssh/id_dsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\<username>/.ssh/id_dsa-cert type -1
debug3: Failed to open file:C:\\Users\\<username>/.ssh/id_ecdsa error:2
debug3: Failed to open file:C:\\Users\\<username>/.ssh/id_ecdsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\<username>/.ssh/id_ecdsa type -1
debug3: Failed to open file:C:\\Users\\<username>/.ssh/id_ecdsa-cert error:2
debug3: Failed to open file:C:\\Users\\<username>/.ssh/id_ecdsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\<username>/.ssh/id_ecdsa-cert type -1
debug3: Failed to open file:C:\\Users\\<username>/.ssh/id_ed25519 error:2
debug3: Failed to open file:C:\\Users\\<username>/.ssh/id_ed25519.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\<username>/.ssh/id_ed25519 type -1
debug3: Failed to open file:C:\\Users\\<username>/.ssh/id_ed25519-cert error:2
debug3: Failed to open file:C:\\Users\\<username>/.ssh/id_ed25519-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\<username>/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.6
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4p1 Raspbian-10+deb9u4
debug1: match: OpenSSH_7.4p1 Raspbian-10+deb9u4 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 192.168.0.56:22 as 'pi'
debug3: hostkeys_foreach: reading file "C:\\Users\\<username>/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file C:\\Users\\<username>/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys from 192.168.0.56
debug3: Failed to open file:C:\\Users\\<username>/.ssh/known_hosts2 error:2
debug3: Failed to open file:C:\\ProgramData\\ssh/ssh_known_hosts error:2
debug3: Failed to open file:C:\\ProgramData\\ssh/ssh_known_hosts2 error:2
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
debug2: MACs ctos: 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
debug2: MACs stoc: 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
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: 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
debug2: MACs stoc: 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
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:jHvzKrfoD0GjWHqvdK2fShADKdJKcwUxpZdG2IEScuA
debug3: hostkeys_foreach: reading file "C:\\Users\\<username>/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file C:\\Users\\<username>/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys from 192.168.0.56
debug3: Failed to open file:C:\\Users\\<username>/.ssh/known_hosts2 error:2
debug3: Failed to open file:C:\\ProgramData\\ssh/ssh_known_hosts error:2
debug3: Failed to open file:C:\\ProgramData\\ssh/ssh_known_hosts2 error:2
debug1: Host '192.168.0.56' is known and matches the ECDSA host key.
debug1: Found key in C:\\Users\\<username>/.ssh/known_hosts:1
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug3: unable to connect to pipe \\\\.\\pipe\\openssh-ssh-agent, error: 2
debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory
debug2: key: C:\\Users\\<username>/.ssh/id_rsa (0000000000000000)
debug2: key: C:\\Users\\<username>/.ssh/id_dsa (0000000000000000)
debug2: key: C:\\Users\\<username>/.ssh/id_ecdsa (0000000000000000)
debug2: key: C:\\Users\\<username>/.ssh/id_ed25519 (0000000000000000)
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: C:\\Users\\<username>/.ssh/id_rsa
debug3: GetFileAttributesExW with last error 2
debug3: no such identity: C:\\Users\\<username>/.ssh/id_rsa: No such file or directory
debug1: Trying private key: C:\\Users\\<username>/.ssh/id_dsa
debug3: GetFileAttributesExW with last error 2
debug3: no such identity: C:\\Users\\<username>/.ssh/id_dsa: No such file or directory
debug1: Trying private key: C:\\Users\\<username>/.ssh/id_ecdsa
debug3: GetFileAttributesExW with last error 2
debug3: no such identity: C:\\Users\\<username>/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: C:\\Users\\<username>/.ssh/id_ed25519
debug3: GetFileAttributesExW with last error 2
debug3: no such identity: C:\\Users\\<username>/.ssh/id_ed25519: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
debug3: failed to open file:/dev/tty error:3
debug1: read_passphrase: can't open /dev/tty: No such file or directory
pi@192.168.0.56's password:
debug3: send packet: type 50
debug2: we sent a password packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
debug3: failed to open file:/dev/tty error:3
debug1: read_passphrase: can't open /dev/tty: No such file or directory

I've checked the Authentication log (via OMV) and it seems to contain some errors from around when I first attempted to SSH after the reboot following the Kodi install. I don't know if this is relevant or not, but when I initially tried to SSH, I forgot to add the username - so I just ran:

ssh 192.168.0.56

This obviously tried to connect to the Pi with my Windows username (failed!). I then re-ran specifying user pi:

ssh pi@192.168.0.56

The Authentication log contains the following from when I installed Kodi and then attempted to SSH:

Jan  7 09:33:43 raspberrypi sudo:       pi : TTY=pts/0 ; PWD=/sharedfolders ; USER=root ; COMMAND=/usr/bin/apt-get update
Jan  7 09:33:43 raspberrypi sudo: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan  7 09:34:18 raspberrypi sudo: pam_unix(sudo:session): session closed for user root
Jan  7 09:36:06 raspberrypi sudo:       pi : TTY=pts/0 ; PWD=/sharedfolders ; USER=root ; COMMAND=/usr/bin/apt-get install kodi
Jan  7 09:36:06 raspberrypi sudo: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan  7 09:37:19 raspberrypi sudo: pam_unix(sudo:session): session closed for user root
Jan  7 09:39:01 raspberrypi CRON[16719]: pam_unix(cron:session): session opened for user root by (uid=0)
Jan  7 09:39:01 raspberrypi CRON[16719]: pam_unix(cron:session): session closed for user root
Jan  7 09:40:12 raspberrypi sudo:       pi : TTY=pts/0 ; PWD=/sharedfolders ; USER=root ; COMMAND=/bin/ps -ef
Jan  7 09:40:12 raspberrypi sudo: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan  7 09:40:12 raspberrypi sudo: pam_unix(sudo:session): session closed for user root
Jan  7 09:40:59 raspberrypi sudo:       pi : TTY=unknown ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/rc_gui -k
Jan  7 09:40:59 raspberrypi sudo: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan  7 09:40:59 raspberrypi sudo: pam_unix(sudo:session): session closed for user root
Jan  7 09:41:15 raspberrypi sudo:       pi : TTY=unknown ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/rc_gui -k
Jan  7 09:41:15 raspberrypi sudo: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan  7 09:41:15 raspberrypi sudo: pam_unix(sudo:session): session closed for user root
Jan  7 09:45:01 raspberrypi CRON[16965]: pam_unix(cron:session): session opened for user root by (uid=0)
Jan  7 09:45:08 raspberrypi CRON[16965]: pam_unix(cron:session): session closed for user root
Jan  7 09:52:36 raspberrypi systemd-logind[397]: New seat seat0.
Jan  7 09:52:38 raspberrypi sshd[543]: Server listening on 0.0.0.0 port 22.
Jan  7 09:52:38 raspberrypi sshd[543]: Server listening on :: port 22.
Jan  7 09:52:43 raspberrypi login[555]: pam_unix(login:session): session opened for user pi by LOGIN(uid=0)
Jan  7 09:52:43 raspberrypi lightdm: pam_unix(lightdm-autologin:session): session opened for user pi by (uid=0)
Jan  7 09:52:43 raspberrypi systemd-logind[397]: New session c1 of user pi.
Jan  7 09:52:43 raspberrypi systemd: pam_unix(systemd-user:session): session opened for user pi by (uid=0)
Jan  7 09:52:43 raspberrypi systemd-logind[397]: New session c2 of user pi.
Jan  7 09:52:47 raspberrypi polkitd(authority=local): Registered Authentication Agent for unix-session:c2 (system bus name :1.13 [lxpolkit], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_GB.UTF-8)
Jan  7 09:57:24 raspberrypi sshd[1148]: Invalid user <username>@domain from 192.168.0.18 port 49614
Jan  7 09:57:24 raspberrypi sshd[1148]: input_userauth_request: invalid user <username>@domain [preauth]
Jan  7 09:57:27 raspberrypi sshd[1148]: Connection reset by 192.168.0.18 port 49614 [preauth]
Jan  7 09:59:35 raspberrypi sshd[1171]: User pi from 192.168.0.18 not allowed because none of user's groups are listed in AllowGroups
Jan  7 09:59:35 raspberrypi sshd[1171]: input_userauth_request: invalid user pi [preauth]
Jan  7 09:59:38 raspberrypi sshd[1171]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.0.18  user=pi
Jan  7 09:59:40 raspberrypi sshd[1171]: Failed password for invalid user pi from 192.168.0.18 port 49998 ssh2
Jan  7 09:59:49 raspberrypi sshd[1171]: Failed password for invalid user pi from 192.168.0.18 port 49998 ssh2
Jan  7 10:00:01 raspberrypi CRON[1182]: pam_unix(cron:session): session opened for user root by (uid=0)
Jan  7 10:00:08 raspberrypi CRON[1182]: pam_unix(cron:session): session closed for user root
Jan  7 10:05:51 raspberrypi openmediavault-webgui[1316]: Authorized login from ::ffff:192.168.0.18 [username=admin, user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36]
Jan  7 10:06:35 raspberrypi usermod[1557]: change user 'pi' GID from '1000' to '100'
Jan  7 10:06:35 raspberrypi usermod[1557]: change user 'pi' password
Jan  7 10:06:35 raspberrypi usermod[1557]: add 'pi' to group 'pi'
Jan  7 10:06:35 raspberrypi usermod[1557]: add 'pi' to shadow group 'pi'
Jan  7 10:06:56 raspberrypi sshd[2026]: User pi from 192.168.0.18 not allowed because none of user's groups are listed in AllowGroups

Apologies for the rather lengthy post, but I wanted to try and include all relevant information.

Can anyone provide any guidance on why this is happening? And how to resolve?

Thanks

  • Quick update: I've just connected to the Pi using VNC on my phone...no errors and connects fine! Still can't connect via SSH from Win 10 though – user2724502 Jan 7 at 11:36
  • check /etc/ssh/sshd_config for a line containing AllowGroups ... remove it – Jaromanda X Jan 7 at 14:18
  • 1
    Post your entire /etc/ssh/sshd_config. Messing with the pi user's GID was probably a bad idea. – goldilocks Jan 7 at 14:47
  • I didn't think I had messed with the pi user's GID? Are you saying something I did has changed the GID? – user2724502 Jan 7 at 15:19
  • 1
    Look at the auth log entry starting at 10:06:35. Did you try to modify the user? Someone did, and they changed the GID. This may have all kinds of side effects. – goldilocks Jan 7 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.