My raspberry pi randomly started refusing connections. After a reboot it allows connections, nothing has been changed in months with the config.
Here is the ssh -vvv
output
OpenSSH_5.9p1 Debian-5ubuntu1.3, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.1.21 [192.168.1.21] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/matthew/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /home/matthew/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/matthew/.ssh/id_rsa-cert type -1
debug1: identity file /home/matthew/.ssh/id_dsa type -1
debug1: identity file /home/matthew/.ssh/id_dsa-cert type -1
debug1: identity file /home/matthew/.ssh/id_ecdsa type -1
debug1: identity file /home/matthew/.ssh/id_ecdsa-cert type -1ssh_exchange_identification: Connection closed by remote host
output of stat /home/matthew/.ssh/id_rsa
File: ‘/home/matthew/.ssh/id_rsa’
Size: 1675 Blocks: 8 IO Block: 4096 regular file
Device: 811h/2065d Inode: 564404 Links: 1
Access: (0600/-rw-------) Uid: ( 1000/ matthew) Gid: ( 1000/ matthew)
Access: 2015-10-26 20:46:38.000000000 -0400
Modify: 2011-03-06 22:34:36.000000000 -0500
Change: 2011-03-06 22:34:36.000000000 -0500
Birth: -
output of stat /home/matthew/.ssh
File: ‘/home/matthew/.ssh’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 811h/2065d Inode: 564461 Links: 2
Access: (0700/drwx------) Uid: ( 1000/ matthew) Gid: ( 1000/ matthew)
Access: 2015-10-27 11:14:03.000000000 -0400
Modify: 2015-09-04 11:55:54.000000000 -0400
Change: 2015-09-04 11:55:54.000000000 -0400
Birth: -
UPDATE
I found last night that ssh
began refusing new connections while I had an active/functioning connection on going. I tried to open another ssh
connection and it again was refused.
/home/matthew/.ssh/id_rsa
exist? Edit in the output fromstat /home/matthew/.ssh/id_rsa
andstat /home/matthew/.ssh
.ssh [email protected]
. If you connect withssh 192.168.1.21
without a username then, a user matthew must exist on the raspi. The public key is taken from that user account. Perhaps you connect with a existing username when it worked and without a username when it refused connection. It's just a guess ;-).