Cannot get ssh to work


8 posts
by unkle » Wed Dec 12, 2012 10:37 pm
Hello all
I cannot seem to ssh into my pi. I've tried everything i can think of

It's the latest build (ssh should be enabled)
Router is DHCP
IP is bound to MAC address
Tried different IP
Used both PuTTY and the terminal on my ubuntu machine
It responds to ping
Port 22 is open
Different power supplies
Different patch cables

Sometimes it returns connection refused, sometime connection timed out

I'm hoping someone can suggest something else to try as im at a loss
Cheers
Posts: 4
Joined: Wed Dec 12, 2012 10:19 pm
Location: Yorkshire
by joan » Wed Dec 12, 2012 11:13 pm
Check to see if another machine has the same IP address as the Pi.
User avatar
Posts: 4195
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK
by Mursili » Thu Dec 13, 2012 3:06 am
Have you made sure that you are communicating with the correct IP address? ssh -v should tell you what IP is being connected to.
User avatar
Posts: 28
Joined: Fri Nov 23, 2012 2:12 am
by efflandt » Thu Dec 13, 2012 3:18 am
Assuming Raspbian? Did you enable the ssh server when raspi-config ran the first time you booted? Does netstat show port 22 listening:

Code: Select all
efflandt@raspberrypi ~ $ netstat -ltn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:6011          0.0.0.0:*               LISTEN


If not, enable it in: sudo raspi-config
Posts: 359
Joined: Mon Dec 03, 2012 2:47 am
Location: Elgin, IL USA
by unkle » Thu Dec 13, 2012 7:38 pm
Hi
no conflict with ip and ip correct. I will check port out later tonight.

I tried setting it up headless, but when that failed I hooked it up to the tv and did the initial startup config there. unfortunately no LAN near the tv, so I had to set it up offline

apologies, yes it is the raspian wheezy build 28/10/12
Posts: 4
Joined: Wed Dec 12, 2012 10:19 pm
Location: Yorkshire
by unkle » Fri Dec 14, 2012 9:38 pm
hello
netstat reports port 22 is listening.
ssh enabled in config
Still get connection refused

Tom
Posts: 4
Joined: Wed Dec 12, 2012 10:19 pm
Location: Yorkshire
by Mursili » Fri Dec 14, 2012 10:46 pm
What does ssh -v say? Are you sure you are using ssh correctly? For example, using the -l option to ensure that you are logging into the 'pi' account.

I do not think that there is enough information for us to help at this time.
User avatar
Posts: 28
Joined: Fri Nov 23, 2012 2:12 am
by unkle » Mon Dec 17, 2012 10:43 pm
Mursili wrote:Have you made sure that you are communicating with the correct IP address? ssh -v should tell you what IP is being connected to.


It was this. I could've sworn i had the right IP! :D At the weekend i wired an RJ45 jack to the TV so i could use the terminal on the pi, instead of trying to set it up headless.

ifconfig eth0, then face palm.

pi working fine, thanks for the input and apologies for any wasted time
Posts: 4
Joined: Wed Dec 12, 2012 10:19 pm
Location: Yorkshire