SSH connection refused


5 posts
by cereju » Wed Jan 23, 2013 10:51 pm
Hello everyone, I ordered my Raspberry Pi and got it yesterday, I've set the Raspbian-wheezy (2012-12-16-wheezy-raspbian version) on the SD Card and everything seems to work just fine (booted correctly).

I have an HDMI monitor but currently no USB keyboard, so I was thinking if I could try an SSH connection to the Pi, all I get is "ssh: connect to host <IP I use> port 22: Connection refused", I tried to google the problem but found nothing really useful, I even modified the "/etc/network/interfaces" file on the SD card to get a static IP address like someone suggested, still nothing.

If anyone could help me with this I would appreciate it since my main goal is to control the Rb Pi with a remote keyboard, a.k.a. my laptop's keyboard.

Any more info I could give just ask me.

P.S. - I use an ethernet cable and my OS is Ubuntu 11.10 (natty)
Posts: 3
Joined: Wed Jan 23, 2013 10:41 pm
by redhawk » Wed Jan 23, 2013 11:03 pm
You cannot connect because either you're entering the wrong IP address or the Pi hasn't been assigned a valid IP address.
Try running a DHCP server on your laptop if that doesn't work then you're better off using a wired / wireless router.

Richard S.
User avatar
Posts: 3519
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1
by jamesh » Wed Jan 23, 2013 11:09 pm
cereju wrote:Hello everyone, I ordered my Raspberry Pi and got it yesterday, I've set the Raspbian-wheezy (2012-12-16-wheezy-raspbian version) on the SD Card and everything seems to work just fine (booted correctly).

I have an HDMI monitor but currently no USB keyboard, so I was thinking if I could try an SSH connection to the Pi, all I get is "ssh: connect to host <IP I use> port 22: Connection refused", I tried to google the problem but found nothing really useful, I even modified the "/etc/network/interfaces" file on the SD card to get a static IP address like someone suggested, still nothing.

If anyone could help me with this I would appreciate it since my main goal is to control the Rb Pi with a remote keyboard, a.k.a. my laptop's keyboard.

Any more info I could give just ask me.

P.S. - I use an ethernet cable and my OS is Ubuntu 11.10 (natty)


Does your Raspi boot to the login prompt? Or does it get to the Raspi config screen? You really need a keyboard to set up the device through Raspi Config (where there is an option to setup ssh). Once booted, login then use ifconfig to find the Raspi IP address.

Then on remote system

ssh <pi ip addr>

Been using it like that all day with the latest Raspbian freshly installed.
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11967
Joined: Sat Jul 30, 2011 7:41 pm
by cereju » Wed Jan 23, 2013 11:13 pm
jamesh wrote:
cereju wrote:Hello everyone, I ordered my Raspberry Pi and got it yesterday, I've set the Raspbian-wheezy (2012-12-16-wheezy-raspbian version) on the SD Card and everything seems to work just fine (booted correctly).

I have an HDMI monitor but currently no USB keyboard, so I was thinking if I could try an SSH connection to the Pi, all I get is "ssh: connect to host <IP I use> port 22: Connection refused", I tried to google the problem but found nothing really useful, I even modified the "/etc/network/interfaces" file on the SD card to get a static IP address like someone suggested, still nothing.

If anyone could help me with this I would appreciate it since my main goal is to control the Rb Pi with a remote keyboard, a.k.a. my laptop's keyboard.

Any more info I could give just ask me.

P.S. - I use an ethernet cable and my OS is Ubuntu 11.10 (natty)


Does your Raspi boot to the login prompt? Or does it get to the Raspi config screen? You really need a keyboard to set up the device through Raspi Config (where there is an option to setup ssh). Once booted, login then use ifconfig to find the Raspi IP address.

Then on remote system

ssh <pi ip addr>

Been using it like that all day with the latest Raspbian freshly installed.


My Raspi gets to the Raspi config screen directly, doesn't boot to the login prompt. I thought I could access it directly trough ssh and run some commands remotely, it would be sweet not having to buy an extra keyboard.
Posts: 3
Joined: Wed Jan 23, 2013 10:41 pm
by cereju » Thu Jan 24, 2013 12:33 am
Ok guys, I've configured a DHCP server, edited the Raspi's IP address manually and now I have an ssh connection (didn't need to buy keyboard!!!).

Thanks for the replies, very helpful!
Posts: 3
Joined: Wed Jan 23, 2013 10:41 pm