I'm trying to connect my rasberry pi through ethernet. I'm using debian 8.9.0.

When i typ the command: ssh -l pi

I get the following error ssh: connect to host port 22: No route to host.

I'm very new to rasberry so i'm not sure what i am doing wrong.

2 Answers 2


If you are running headless:

  1. Make sure that is the IP address for your Raspberry pi, can you ping

  2. Have you created a file called "ssh" without extension in /boot of the SD-Card?

If you have a screen and keyboard connected

sudo raspi-config

and choose advanced->enable ssh


In my case, I use a mobile stick for internet access and local router too. I played the router settings and setted some option, which need to ssh for me.

  • separate AP [on] <- wrong setting in my case

And a many long months later I try ssh connect to my raspberry, but it exited with No route to host message. I find firewall settings, and sshd config, but everything looked good. After that I remember to the router settings, and try out revert some setting, and one of that works:

  • separate AP [off] <- good setting in my case

I am not sure what is this setting doing, but I am sure, without this cannot connet via ssh or VNC to raspberry. The strange thing that rpi has internet access and works well, therefore, it has not been revealed before.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.