Skip to main content
3 of 7
added 835 characters in body; added 82 characters in body

Ssh connection refused

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 

'stat /home/matthew/.ssh/id_rsa' output

"matthew@server:~$ 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: - "

'stat /home/matthew/.ssh' output

" matthew@server:~$ 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: - "