cpighin
Posts: 43
Joined: Tue Mar 17, 2015 12:14 pm
Location: Ciampino (Rome), Italy

SSH problem on RPi3

Wed Jan 18, 2017 9:52 am

Hi,

I'm currently running my new RPi3 by connecting it to my router with a LAN cable and USB monitor and keyboard connected to the board, but I would like to use SSH instead and I'm having problems.

I know that the IP address given to RPi3 by my router is actually 192.168.1.100.
I know also that in RPi3 the SSH service is disabled as default and I created file "ssh" into the Boot partition of theSD card to enable SSH.
From previous experiences I know also that the file /home/claudio/.ssh/known_hosts on the client PC could be the problem, so I cancelled it as done in the past.

When I try to connect the RPi3 and my PC with SSH by command "ssh pi@192.168.1.100 -v” I get the following code:

Code: Select all

claudio@ASUS-S551LN:~$ ssh pi@192.168.1.100 -v
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.1.100 [192.168.1.100] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/claudio/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/claudio/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/claudio/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/claudio/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/claudio/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/claudio/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/claudio/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/claudio/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.7p1 Raspbian-5+deb8u3
debug1: match: OpenSSH_6.7p1 Raspbian-5+deb8u3 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.1.100:22 as 'pi'
debug1: SSH2_MSG_KEXINIT sent
Connection closed by 192.168.1.100 port 22
What you suggest to solve the issue?

Claudio :)

Edit 11:00 > On my RPi3 is installed raspbian-jessie-lite

cpighin
Posts: 43
Joined: Tue Mar 17, 2015 12:14 pm
Location: Ciampino (Rome), Italy

Re: SSH problem on RPi3

Wed Jan 18, 2017 12:09 pm

Here is a little improvement inspired by article http://serverfault.com/questions/813519 ... 545#813545.

I created folder etc/empty (I was not sure if "empty" should be a file or directory!) and I tried to connect my RPi3 to PC by SSH as in the first post. Now the output is a little different

Code: Select all

claudio@ASUS-S551LN:~$ ssh pi@192.168.1.100 -v
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.1.100 [192.168.1.100] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/claudio/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/claudio/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/claudio/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/claudio/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/claudio/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/claudio/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/claudio/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/claudio/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.7p1 Raspbian-5+deb8u3
debug1: match: OpenSSH_6.7p1 Raspbian-5+deb8u3 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.1.100:22 as 'pi'
debug1: SSH2_MSG_KEXINIT sent
Connection reset by 192.168.1.100 port 22
where only the last line is different: now I have

Code: Select all

Connection reset by 192.168.1.100 port 22
instead of

Code: Select all

Connection closed by 192.168.1.100 port 22
Was I right on creating a folder etc/empty or should I create a file instead?

Claudio :)

hempstutorials
Posts: 6
Joined: Wed Sep 14, 2016 2:16 pm

Re: SSH problem on RPi3

Thu Jan 19, 2017 4:33 pm

ive got a great post on my blog all about SSH check it out

https://www.hempstutorials.co.uk/secure-shell-ssh-101/

pretagonist
Posts: 1
Joined: Wed Mar 08, 2017 12:30 pm

Re: SSH problem on RPi3

Wed Mar 08, 2017 3:07 pm

I have the exact same issue on my rp3 running hassbian for home assistant. It somehow crashes and won't accept ssh connections.

Return to “Troubleshooting”