Page 1 of 3

Re: SSH Guide For Complete noob?

Posted: Tue Apr 24, 2012 1:17 am
by pmgmr2
Hello, I just got my raspberry pi and I've been trying to figure out how to VNC into it from my laptop..I found a guide online for this:

http://www.cnx-software.com/20.....pberry-pi/

...but the first step says to "Connect via SSH"...I've installed Putty on my Win7 laptop and entered the local IP of the rPi and entered my username, but I'm still getting "connection refused"

I've never used SSH and know almost nothing about it, but I've been scouring guides for a couple days and come up with nothing....please help!  Thank you.

Re: SSH Guide For Complete noob?

Posted: Tue Apr 24, 2012 1:25 am
by abishur
Welcome to the forums!

Let's start at the beginning, what distro are you using (Debian, Fedora Remix?)

Second, when you say "you input your user name" do you mean pi/raspberry?  Or did you make a new user on the R-pi?

Re: SSH Guide For Complete noob?

Posted: Tue Apr 24, 2012 1:43 am
by sandbasser
Are you sure you have some kind of SSH server running on the Pi???  (I believe i read somewhere that one of the distros has SSH turned off by default.)

Can you ping the IP Address of the Pi???

"Connection refused" can mean there"s no listener on port 22 on the IP address you"re trying to connect to; and, it can also mean that you"ve got your SSH setting wrong in PuTTY.

I haven"t got my Pi yet so I"m afraid i can"t offer anything other than these few basic suggestions.

Another thing to try in PuTTY is to NOT enter a auto-login username PuTTY's Connection-Data config but let it prompt you…IIRC the first time you connect it will prompt to accept a default certificate.

-Ray

Re: SSH Guide For Complete noob?

Posted: Tue Apr 24, 2012 1:56 am
by abishur
Side note if it's the debian build and you haven't done this yet, you'll need to in order to turn on SSH

rename boot_enable_ssh.rc to boot.rc on the boot partition you can do this by issuing the following the commands

1. sudo bash

2. cd /boot

3. mv boot_enable_ssh.rc boot.rc

4. shutdown -r -time now

Once it finishes rebooting you'll have ssh enabled

Re: SSH Guide For Complete noob?

Posted: Tue Apr 24, 2012 2:01 am
by ukscone
[edited because Abishur got to it before me but leaving one bit in ]

Once you have done the above as Abishur posted all should be good except

you'"ll have to wait a couple minutes or so for sshd to come up. if you try before it is ready you"ll get the connection refused message.

Re: SSH Guide For Complete noob?

Posted: Tue Apr 24, 2012 2:18 am
by pmgmr2
Abishur said:


Welcome to the forums!

Let's start at the beginning, what distro are you using (Debian, Fedora Remix?)

Second, when you say "you input your user name" do you mean pi/raspberry?  Or did you make a new user on the R-pi?


Thank you for the warm welcome and quick reply!  I am using the 4-19 Debian distro on a 8GB SDHC card.  The username & pwd are the default "pi" and "raspberry" respectively.

Re: SSH Guide For Complete noob?

Posted: Tue Apr 24, 2012 2:20 am
by pmgmr2
sandbasser said:


Are you sure you have some kind of SSH server running on the Pi???  (I believe i read somewhere that one of the distros has SSH turned off by default.)

Can you ping the IP Address of the Pi???

"Connection refused" can mean there"s no listener on port 22 on the IP address you"re trying to connect to; and, it can also mean that you"ve got your SSH setting wrong in PuTTY.

I haven"t got my Pi yet so I"m afraid i can"t offer anything other than these few basic suggestions.

Another thing to try in PuTTY is to NOT enter a auto-login username PuTTY"s Connection-Data config but let it prompt you…IIRC the first time you connect it will prompt to accept a default certificate.

-Ray


Yes, I am able to ping the pi and when I didn't enter an autologin in putty, I got the same "connection refused" error.

Re: SSH Guide For Complete noob?

Posted: Tue Apr 24, 2012 2:21 am
by abishur
Did you try what I mentioned in my second post?

Re: SSH Guide For Complete noob?

Posted: Tue Apr 24, 2012 2:26 am
by pmgmr2
Abishur - I just tried your method and it totally worked; the solution seemed so simple once I understood what was wrong!

Thank you so much for your help; I'm just getting started with linux and I'm looking forward to this new SSH world that's been opened to me.

Re: SSH Guide For Complete noob?

Posted: Tue Apr 24, 2012 3:00 am
by abishur
No prob!  I only knew it because Ukscone mentioned it in a tweet and the comments on a blog post.  It's pretty new tech so there's not any one "I know everything" person here

Re: SSH Guide For Complete noob?

Posted: Tue Apr 24, 2012 12:09 pm
by Tass
Perfect – just what I needed!!  I found that while SSH started automatically on the earlier Debian images, the it didn't on the latest one (19-04-2012), ending up with the same "connection refused" error.

While we're all here….  This works really well, I can start up VNC, etc., and I can connect.  This works well if I'm wanting to use the Pi as a completely headless machine.  Eventually though I'm considering connecting my Pi to my TV to play media, and want to be able to connect remotely.  When running vncserver it creates a new instance and allows me to connect to that.  I want to be able to connect to and control the instance currently running on the TV?

EDIT: BTW, I've got a guide here that will allow you to control the resolution of VNC that you start up on the Pi - I found that useful when connecting in from my laptop http://myraspberrypiexperience.....p-vnc.html

Re: SSH Guide For Complete noob?

Posted: Tue Apr 24, 2012 12:30 pm
by Joe Schmoe
FWIW, isn't the core issue in this thread the old "chicken-and-egg" problem?

I.e., the way I heard the talk here is that someone was running headless, and couldn't get in via SSH (because it is disabled by default).   And the point is then, of course, that if you are running headless, you can't get in to the machine (I.e., the Pi) any other way to make the changes needed to get SSH running.

So, it seems to me, the advice we should be giving is how to fix it using another PC (i.e., not using the Pi itself).  And for that, you will need a Linux machine with an SD card reader - and mount it and rename that file and so on and so forth.

Re: SSH Guide For Complete noob?

Posted: Tue Apr 24, 2012 12:34 pm
by Tass
Joe Schmoe said:


FWIW, isn't the core issue in this thread the old "chicken-and-egg" problem?

I.e., the way I heard the talk here is that someone was running headless, and couldn't get in via SSH (because it is disabled by default).   And the point is then, of course, that if you are running headless, you can't get in to the machine (I.e., the Pi) any other way to make the changes needed to get SSH running.

So, it seems to me, the advice we should be giving is how to fix it using another PC (i.e., not using the Pi itself).  And for that, you will need a Linux machine with an SD card reader - and mount it and rename that file and so on and so forth.


Well, technically you can get in without a screen by booting up and very carefully typing the following in:

pi

raspberry

sudo /etc/init.d/ssh start

But I get your point

Re: SSH Guide For Complete noob?

Posted: Tue Apr 24, 2012 12:39 pm
by Joe Schmoe
I get your point...

But isn't the usual meaning of "headless" that you have no screen or keyboard?

Re: SSH Guide For Complete noob?

Posted: Tue Apr 24, 2012 12:50 pm
by frying_fish
True, but for troubleshooting, or a quick temporary thing, hooking up a keyboard to login and start SSH, then disconnecting going back and setting SSH to run at boot everytime from then on isn't such a bad idea.

Re: SSH Guide For Complete noob?

Posted: Tue Apr 24, 2012 2:05 pm
by ukscone
Joe Schmoe said:


.And for that, you will need a Linux machine with an SD card reader – and mount it and rename that file and so on and so forth.


the file is in the fat partition which windows can see so you don't need a linux machine. any old thing with an sd card read/writer will do

Re: SSH Guide For Complete noob?

Posted: Wed Apr 25, 2012 3:56 pm
by pmgmr2
Hello again!  I'm SSH'ing like a champ, but having trouble getting the correct GUI to come up.  Whenever I connect, it brings up a screen with the LXDE background, NOT the raspberry logo background.  Additionally, I can't click the toolbar...that is, it simply doesnt respond to my mouse click.  I did some research and I guess this is a different X display....?

Anyway, I did some more research, and found out about x11vnc at this page and installed it:

https://wiki.archlinux.org/index.php/X1 ... _up_x11vnc

Here's the bizarre thing: If I open startx from the raspberry pi itself and then move to my windows computer to SSH in & run tightVNC client, I'm able to remotely get the 'right' deskop with the rPi background.

If I do everything from the windows computer (SSH in, run startx, and run x11vnc) it gives me that blue LXDE desktop.

What am I doing wrong?

Re: SSH Guide For Complete noob?

Posted: Wed Apr 25, 2012 5:53 pm
by Gert van Loo
Joe Schmoe said:


FWIW, isn't the core issue in this thread the old "chicken-and-egg" problem?

I.e., the way I heard the talk here is that someone was running headless, and couldn't get in via SSH (because it is disabled by default).   And the point is then, of course, that if you are running headless, you can't get in to the machine (I.e., the Pi) any other way to make the changes needed to get SSH running.

So, it seems to me, the advice we should be giving is how to fix it using another PC (i.e., not using the Pi itself).  And for that, you will need a Linux machine with an SD card reader - and mount it and rename that file and so on and so forth.


You can access the boot directory from any Windows PC with an SD card reader. There you can make the changes you want and then plug it into a Pi and use it. It is still not exactly a "chicken-and-egg" problem, more a "chicken-and-duckegg" problem as you can use a more common patform (chicken) to get your duck hatched.

I have used it in the opposite direction as well. The gertboard demo software was debugged on a Pi with no network access. Then I copied the final files to /boot and pulled them off using a Windows PC.

Re: SSH Guide For Complete noob?

Posted: Wed Apr 25, 2012 6:02 pm
by Joe Schmoe
FWIW, I never looked into things closely enough to really tell what was in which partition.  I sort of assumed that all that needed to be in the FAT partition was the bare metal files - that is, the things leading up and including booting the kernel - and that everything else (all the other stuff that goes into the boot process, including starting the daemons) would be in the Linux (i.e., EXT{whatever}) partition.

Anyway, if you can do this task (re-enabling SSH) from a Windows PC as well, then that's (obviously) all to the good!

And, of course, just for completeness, if the needed files did reside on an EXT{whatever} partition, then you could get one of those "read Linux disks from Windows" thingies and install that on your Windows box and still be able to do it without needing to invoke the dreaded "L word".

Re: SSH Guide For Complete noob?

Posted: Wed Apr 25, 2012 7:03 pm
by obarthelemy
I've tried those "ext for windows" tools, none I could find works reliably, or at all.

Re: SSH Guide For Complete noob?

Posted: Wed Apr 25, 2012 7:32 pm
by Tass
OK - so can someone clarify what file we need to actually change, and what we need to change in it?

Re: SSH Guide For Complete noob?

Posted: Wed Apr 25, 2012 8:56 pm
by abishur
Tass said:


OK - so can someone clarify what file we need to actually change, and what we need to change in it?



4th post in this thread

Re: SSH Guide For Complete noob?

Posted: Wed Apr 25, 2012 9:06 pm
by Tass
Abishur said:


Tass said:


OK - so can someone clarify what file we need to actually change, and what we need to change in it?


4th post in this thread



D'oh!!   Thanks a lot - works a treat!!

Re: SSH Guide For Complete noob?

Posted: Wed Apr 25, 2012 9:08 pm
by abishur
Tass said:


Abishur said:


Tass said:


OK - so can someone clarify what file we need to actually change, and what we need to change in it?


4th post in this thread


D'oh!!   Thanks a lot - works a treat!!




Re: SSH Guide For Complete noob?

Posted: Wed May 09, 2012 6:09 pm
by lufflumh
right – im clearly doing something wrong somewhere around here!

i've tried the whole sudo bash, cd /boot, mv bla bla bla…and it come up with no such file or directory, i am using debian and can't get the ssh to work.

also, i read in another thread (http://www.raspberrypi.org/for.....spberry-pi) and it say's to set something, in the ssh bit.

now i am new to setting up an ssh, so could anyone help me out and try to resolve this issue, i am going to rewrite my sd card with a new image to get back to square and try it all again, but if anyone can see anything obvious i have done wrong then please call me a numpty and put me in the corner with a dunse hat on. --just reloaded the image and the sudo bash, mv thing worked fine.

i am now struggling to work out how to find out the ip address of my pi, i have it plugged straight into my laptop through the enthernet port.

any suggestions?