Raspberry Pi ssh connection error

10 views (last 30 days)
Onur on 10 Aug 2014
Commented: Saipraveen on 29 Nov 2018
I have setup both my host computer ethernet and the raspberry pi.
I can connect to raspberry pi from host computer via ssh when using putty with no problem.
However neither simulink nor matlab command window can connect. this error comes up:
SSH connection to host failed:
FATAL ERROR: Network error: Connection refused
In the troubleshooting it says to check ip address and password. these must be correct as I use the same with putty.
What could be the problem here?

Answers (3)

Murat Belge
Murat Belge on 8 Sep 2014
From the error message you are getting, Connection Refused, the Raspberry Pi is there but for some reason refusing the SSH connection request. Try to reset you board and see if you can connect. You may need to login to your Raspberry Pi using a monitor and a keyboard and try to see why SSH server is refusing a connection.
Ahmed on 31 Jan 2015
excuse me, i want to ask 1 question where i also have the same problem. Firstly, before you connect the raspberry pi with computer to download the matlab raspi firmware, have you boot the raspberry pi like in youtube (first time use) from the noobs website?

Sign in to comment.

Dennis McLeod
Dennis McLeod on 31 Jan 2015
Hi Onur,
In general only two conditions cause this error:
1. the SSH server is not running on you Raspberry PI. 2. Port 22 used by SSH is being blocked by a firewall,
  1 Comment
Kurt Stewart
Kurt Stewart on 4 May 2018
if the port is being blocked by a firewall would you still be able to connect using Putty?

Sign in to comment.

Mojtaba on 7 Jul 2018
I have exactly the same issue. I am able to connect to the pi through putty, but matlab's ssh connection fails! Is it a common issue?
  1 Comment
Saipraveen on 29 Nov 2018
Could you send a screen shot of the ip config command ? And what type of connection are you using to interface with the raspberry pi ?

Sign in to comment.


Find more on Simulink Support Package for Raspberry Pi Hardware in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!