sayan101pi
Posts: 9
Joined: Mon Feb 20, 2017 6:31 am

Trouble connecting pi 3 via SSH using putty

Mon Feb 20, 2017 7:24 am

I am a beginner with the raspberry pi. I am using the raspberry pi 3 . I am having problem connecting it to my laptop.
i have enabled the SSH connection from the raspberry terminal . But now when i am trying to establish connection using putty it is showing an error message "Network Error: Software caused connection abort.". I can't figure out what the problem is .
Please Help!

Thanks in advance!
Last edited by sayan101pi on Mon Feb 20, 2017 2:32 pm, edited 1 time in total.

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Touble connecting pi 3 via SSH using putty

Mon Feb 20, 2017 8:19 am

from the raspberry terminal window try
ifconfig to find the ip of your RPI
wlan0 Link encap:Ethernet HWaddr b8:27:eb:0d:ea:33
inet addr:192.168.1.203 Bcast:192.168.1.255 Mask:255.255.255.0
hostname

on the ?win? PC cmd window now try
ping -a 192.168.1.203 should tell you same as hostname
arp -a 192.168.1.203 should tell you same HWaddr (MAC)

how is the connection? both are connected to same router?

weavebytes
Posts: 1
Joined: Sun Feb 19, 2017 12:26 pm

Re: Touble connecting pi 3 via SSH using putty

Mon Feb 20, 2017 8:38 am

Kindly ensure that you have enabled ssh from:-

raspi-config -> "Advanced Options" -> "SSH" and enabled it.

Hope this may help !

sayan101pi
Posts: 9
Joined: Mon Feb 20, 2017 6:31 am

Re: Touble connecting pi 3 via SSH using putty

Mon Feb 20, 2017 9:17 am

The SSH connection is enabled.
Still not working.

sayan101pi
Posts: 9
Joined: Mon Feb 20, 2017 6:31 am

Re: Touble connecting pi 3 via SSH using putty

Mon Feb 20, 2017 9:21 am

The connection is fine. I am getting reply after pinging .
both are connected to the same router.

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Touble connecting pi 3 via SSH using putty

Mon Feb 20, 2017 1:06 pm

sayan101pi wrote:Software caused connection abort.
all i tested here gives only time out or connection refused
but not your error msg.
can you try with a fresh burned RASPBIAN SD ( with the (empty) ssh file for first boot )

sayan101pi
Posts: 9
Joined: Mon Feb 20, 2017 6:31 am

Re: Touble connecting pi 3 via SSH using putty

Mon Feb 20, 2017 2:07 pm

KLL wrote:
sayan101pi wrote:Software caused connection abort.
all i tested here gives only time out or connection refused
but not your error msg.
can you try with a fresh burned RASPBIAN SD ( with the (empty) ssh file for first boot )
I tried with afresh burned SD , now its showing connection refused error. But that is because the SSH is disabled by default in the latest Raspbian Jessie .

sayan101pi
Posts: 9
Joined: Mon Feb 20, 2017 6:31 am

Re: Touble connecting pi 3 via SSH using putty

Mon Feb 20, 2017 2:08 pm

Is there any other way of enabling the SSH without using any external display ???

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Touble connecting pi 3 via SSH using putty

Mon Feb 20, 2017 2:14 pm

yes, as i write above,
SD back in card reader, open /boot/ in ?windows? create file named ssh
back in RPI and ssh will be enabled ( and file deleted )

sayan101pi
Posts: 9
Joined: Mon Feb 20, 2017 6:31 am

Re: Touble connecting pi 3 via SSH using putty

Mon Feb 20, 2017 2:23 pm

KLL wrote:yes, as i write above,
SD back in card reader, open /boot/ in ?windows? create file named ssh
back in RPI and ssh will be enabled ( and file deleted )
What kind of file ?
A text file ?

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Touble connecting pi 3 via SSH using putty

Mon Feb 20, 2017 2:29 pm

if a text file would be ssh.txt it would be wrong,
name must be ssh
it can be empty.

sayan101pi
Posts: 9
Joined: Mon Feb 20, 2017 6:31 am

Re: Touble connecting pi 3 via SSH using putty

Mon Feb 20, 2017 2:32 pm

Now its giving network time out error.

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Trouble connecting pi 3 via SSH using putty

Mon Feb 20, 2017 2:36 pm

check IP again /ping arp
check putty settings :IP, port: 22, type: SSH
test with a other ethernet cable RPI--router

sayan101pi
Posts: 9
Joined: Mon Feb 20, 2017 6:31 am

Re: Trouble connecting pi 3 via SSH using putty

Tue Feb 21, 2017 3:12 pm

I did . I am getting reply after pinging .
The connection is alright i guess.

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Trouble connecting pi 3 via SSH using putty

Tue Feb 21, 2017 10:56 pm

if i use win7 cmd ping -a ...
i get "pinging RPI3" ( you must get raspberrypi ) the host name set by sudo raspi-config
Image
if the IP in putty is wrong i get time out,
Image
unless i use the IP of a connected PC,
then get connection refused, same if the RPI IP is right but SSH port is wrong.

sayan101pi
Posts: 9
Joined: Mon Feb 20, 2017 6:31 am

Re: Trouble connecting pi 3 via SSH using putty

Wed Feb 22, 2017 6:15 am

These are my pinging stats.

But now i am again getting connection refused error message.
Attachments
cmd.jpg
cmd.jpg (60.92 KiB) Viewed 7383 times

4LULZ
Posts: 26
Joined: Sat May 07, 2016 1:30 am

Re: Trouble connecting pi 3 via SSH using putty

Wed Feb 22, 2017 9:05 am

Run this command from a terminal window on your pi:

Code: Select all

nano /etc/ssh/sshd_config
3rd - 4th line down should read '# What ports, IPs and protocols we listen for' - what does the line below that say?

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Trouble connecting pi 3 via SSH using putty

Wed Feb 22, 2017 11:14 am

OP already used a new RASPBIAN setup ( and "ssh" file for enable )
so it should not be a RPI settings problem, i work headless from the beginning.

but i see something ( what i not understand )
the ping -a shows a very strange device name
instead of "raspberrypi" it says "raspberrypi.mshome.net"
there might be a difficult network setting possibly with disable ssh port settings? firewall ? ( am i right, it did never work b4 ?)

if network setup is not in your hand i can only recommend
to connect RPI with ethernet cable to laptop ( and laptop online with wifi )
( also not easy setup but we can talk you through )

Ernst
Posts: 1334
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Trouble connecting pi 3 via SSH using putty

Wed Feb 22, 2017 11:38 am

KLL wrote:OP already used a new RASPBIAN setup ( and "ssh" file for enable )
so it should not be a RPI settings problem, i work headless from the beginning.

but i see something ( what i not understand )
the ping -a shows a very strange device name
instead of "raspberrypi" it says "raspberrypi.mshome.net"
there might be a difficult network setting possibly with disable ssh port settings? firewall ? ( am i right, it did never work b4 ?)

if network setup is not in your hand i can only recommend
to connect RPI with ethernet cable to laptop ( and laptop online with wifi )
( also not easy setup but we can talk you through )
raspberrypi.mshome.net and the ip-addresses in 192.168.137.x are easily explained.
Internet Connection Sharing is being used on the PC, this implements a mini-dhcp using 192.168.137.x and the domain mshome.net.

Putty does [should] work with this configuration using the ip-address, I have done this a few times already.
The road to insanity is paved with static ip addresses

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Trouble connecting pi 3 via SSH using putty

Wed Feb 22, 2017 12:21 pm

Ernst wrote:raspberrypi.mshome.net and the ip-addresses in 192.168.137.x are easily explained.
Internet Connection Sharing is being used on the PC, this implements a mini-dhcp using 192.168.137.x and the domain mshome.net.
but that would mean that the RPI is NOT connected to the router, instead to the laptop ethernet port?
sayan101pi wrote:The connection is fine. I am getting reply after pinging .
both are connected to the same router.
anyhow in both cases SSH should work, unless the PC has a firewall blocking 22?

Ernst
Posts: 1334
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Trouble connecting pi 3 via SSH using putty

Wed Feb 22, 2017 12:31 pm

Nothing will surprise me, I have seen it all and I have even done it myself.
Without proper cable management and labeling it is a simple act to plug the wrong cable into the wrong socket. My favorite trick is to put the keyboard USB plug into the RJ45 socket on a notebook and then scratch my head why my keyboard is not working. :)
The road to insanity is paved with static ip addresses

Return to “Beginners”