rwgast
Posts: 31
Joined: Sat Feb 18, 2012 10:26 pm
Contact: Website

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 8:03 am

So if were short a functional digital display by the time the pi comes out is there going to be a way to log in to it and use it? I mean i would like to know if there is some way to preconfigure ssh and vnc on the sdcard image so we can just boot the thing up plug it into the switch and log into it with our pc's?

bbramble
Posts: 60
Joined: Wed Jan 04, 2012 4:10 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 8:17 am

The debian image supplied for download supports ssh and dhcp. You can always plug it into a TV or monitor with DVI (and an adaptor) as well to configure it.

User avatar
nick.mccloud
Posts: 804
Joined: Sat Feb 04, 2012 4:18 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 10:16 am

I've just tried the Debian6 official image and, once I'd figured out what address it had been assigned by DHCP, I was able to ssh in with pi/suse.

I can't see any VNC running but once you are in with ssh you can setup whatever you need.

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 10:31 am

Any suggestion on how we should find the address of a headless RPi on a network?

Do the standard images assign a hostname to the RPi? It would be useful if this was included in the release info for the images. For example, I tested a Debian image for RPi and found that it had the hostname "RaspberryPi" by default.

By knowing the hostname, you can use a command such as

ssh [email protected]

and not have to worry about IP addresses.

Another option is to log into your DHCP server and read the list of active clients. Not very good for beginners.

My personal favourite is to use the Android app Fing. It is great for scanning hosts and ports. But it assumes that you have WiFi available in your subnet (and an Android device).

Do we need instructions for users of headless RPi's? Should we assume that these users know what they are doing?

User avatar
jojopi
Posts: 3190
Joined: Tue Oct 11, 2011 8:38 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 10:37 am

nmcc said:


I've just tried the Debian6 official image and, once I'd figured out what address it had been assigned by DHCP, I was able to ssh in with pi/suse.


That is officially insane!

Seriously, though, setting passwords and configuring services are two of about a dozen things that ideally should be done before the first boot.  By the user, rather than the distributor.

I wonder how the fedora remix will handle these kinds of issue.

User avatar
nick.mccloud
Posts: 804
Joined: Sat Feb 04, 2012 4:18 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 10:40 am

bredman said:


Another option is to log into your DHCP server and read the list of active clients. Not very good for beginners.

Do we need instructions for users of headless RPi's? Should we assume that these users know what they are doing?


I think we can only do our best to help a beginner without a screen but there are limits! I think a there is a reasonable assumption that if you need to access your Pi without a screen you have some ability to find the address/set the host/set a static IP.

bbramble
Posts: 60
Joined: Wed Jan 04, 2012 4:10 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 10:46 am

Not wishing to sound elitist, but if you intend to use it headless, then you should really know how to do these things. Is it really so hard to bring the board up plugged into a screen and keyboard to begin with?

User avatar
grumpyoldgit
Posts: 1452
Joined: Thu Jan 05, 2012 12:20 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 10:57 am

It comes back to a point that has been made several times now. We have beginners instructions mixed up with detailed and complex discussions between experts in their field. There is no easy way to differentiate between the two so the novice has to wade through a lot of chaff to get to the nuggets that will be of use. I would imagine that 99% of purchasers will plug in a keyboard and screen as soon as their Pi arrives. The ssh instructions will be of interest to a technician opening up a box of perhaps 50 Pis that he wants to roll out in a computer suite. I do think a beginners area would be of value.

User avatar
nick.mccloud
Posts: 804
Joined: Sat Feb 04, 2012 4:18 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 11:18 am

jojopi said:


nmcc said:


I've just tried the Debian6 official image and, once I'd figured out what address it had been assigned by DHCP, I was able to ssh in with pi/suse.


That is officially insane!

Seriously, though, setting passwords and configuring services are two of about a dozen things that ideally should be done before the first boot.  By the user, rather than the distributor.


Really, and how do you propose that a very small team of dedicated people working for nothing should deliver a preview edition of a distribution for a computer that isn't even available to buy yet?

Let us all, as you suggest, wait and see.

And even if Fedora comes with a ssh and a user/password, let us all remember that this is an educational tool that is meant to work out the box. Not a commercial offering with top level security to run nuclear reactors (although that didn't work for Iran either!). Once users have got the basics under their belt, then they can graduate to installs with setup etc.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 25977
Joined: Sat Jul 30, 2011 7:41 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 11:23 am

jojopi said:


nmcc said:


I've just tried the Debian6 official image and, once I'd figured out what address it had been assigned by DHCP, I was able to ssh in with pi/suse.


That is officially insane!

Seriously, though, setting passwords and configuring services are two of about a dozen things that ideally should be done before the first boot.  By the user, rather than the distributor.

I wonder how the fedora remix will handle these kinds of issue.


How do you propose to do that on a SD card image before boot? And by the user?

I can see how you might run a script on first boot prompting the required changes, but not how you can do it BEFORE boot on a raw image.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“My wife said to me `...you’re not even listening`.
I thought, that’s an odd way to start a conversation.."

davidgoodenough
Posts: 74
Joined: Wed Sep 21, 2011 11:55 am

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 11:40 am

Well if you have a Linux desktop or laptop it is quite easy or a virtual Linux running under Windows or Mac.

You can adjust the Debian network settings simply by editing the file /etc/network/interfaces - you could set a static IP address for instance, and you can change user IDs and passwords by telling the passwd utility explicitly where to find the /etc/passwd file (i.e. on the SD card).

Both of these could be packaged up in a script to make it easier for new users, which could also hide the dd to copy the basic image onto the SD card.

niknak
Posts: 2
Joined: Fri Feb 24, 2012 10:43 am

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 11:45 am

Given that most users won't be running their own DNS / dynamic DNS, using mDNS (Multicast) is an option.

Iirc, mDNS underlies Apple's Bonjour service, and allows for broadcast of identity to the local network.

In ubuntu & fedora, the avahi project provides this functionality.  I would suggest setting up so that the board's mac address is used as the default identity.

With mdns/avahi enabled (on a client machine), simple domain searches can then be used to find the local systems.  An easier option is to just use the Safari browser's Bookmarks' "bonjour" collection to locate the board.

mDNS is part of Zeroconf (there's an o'Reilly book on the subject)

other information here:

http://fedorasolved.org/Member.....king-avahi

also here:

http://avahi.org/

I don't know if this is has been ported to the Arm branches of Ubuntu and Fedora (/other options), but figure that on the whole the porting process *shouldn't* be too challenging for those familiar with the process (I am more a consumer of packages, I'm afraid).

Anyway, that's one potential route to making the Raspberry Pi board discoverable - avahi can also announce services iirc.

- not having had hands-on experience with the board or emulation, I can't confirm that this is available or works, but it's an approach that can be taken.

User avatar
jojopi
Posts: 3190
Joined: Tue Oct 11, 2011 8:38 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 12:07 pm

nmcc said:

Really, and how do you propose
JamesH said:

How do you propose
I may have been misunderstood.  I was not criticising JamesH's concerns about SSH with a default password, which are valid, or the fact that the Cambridge reference image has SSH with a default password, which I actually agree with, in context.

I am making somewhat the same point as both of you, which is that it is very hard to satisfy everyone's requirements if you distribute boot-ready images.  But I agree with that decision too!

And I may indeed contribute when the remix and boards are available and the precise issues are clearer.

niknak
Posts: 2
Joined: Fri Feb 24, 2012 10:43 am

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 12:21 pm

let's make the assumption that anyone who will be wanting to access the Pi over ssh will probably have access to another linux box (or something that might boot onto a usb key hosted instance).

If this is the case, then mounting the filesystem on the sdcard should not be much of a challenge - and setting up a key pair or password straightforward.  This is also how I would go about enabling ssh.  perhaps verbatim instructions or an x86 script to achieve this would be helpful?

dognosh
Posts: 27
Joined: Thu Jan 12, 2012 11:37 am

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 12:47 pm

Bbramble, You are not elitist , just very sensible. All I see on these forums are moans moans moans , surprised poor liz hasn"t resigned !

Being a Thicko with hardware I will get my RPi , mouse , KB , hdmi cable and a monitor, and take it from there, work out how this and that works, then if I wish I can try headless on my next sd card

xkxx
Posts: 39
Joined: Sat Dec 10, 2011 5:26 am

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 12:48 pm

great news guys. It's amazing how a month ago we were still arguing how insecure having sshd was, I even thought we wouldn't get sshd on the official image. But now at least debian works!

regarding the documentation, once I get my raspi and figure out how to connect to the sshd, I'll definitely post my instructions on the wiki. Now just waiting for the launch!

spurious
Posts: 343
Joined: Mon Nov 21, 2011 9:29 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 8:29 pm

I don't think anyone said sshd wouldn't be on the distos.. I think it comes on them all, but you have to enable it after first boot.

ssh is one of the most required tools ever in my book, but should NEVER be enabled before you get the computer. That would be like a car showroom putting all the cars outside with the fuel tank full and keys in the ignition.

bbramble
Posts: 60
Joined: Wed Jan 04, 2012 4:10 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 9:08 pm

spurious said:


ssh is one of the most required tools ever in my book, but should NEVER be enabled before you get the computer. That would be like a car showroom putting all the cars outside with the fuel tank full and keys in the ignition.



Never is a very strong word. If your target has no console, how do you configure it? Why are you booting *any* machine on a publically accessible network? If you are bringing a board up for the first time and you are not certain of your network, you do the following:

Enable/add a second ethernet card.

Configure DHCP on your second card

Connect your target board with a cross-over cable to the second card

Bingo! Secure network for you to access your target board via SSH.

Any further whining about this is people who clearly do not know what they are about, but haven't bothered to ask.

spurious
Posts: 343
Joined: Mon Nov 21, 2011 9:29 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 9:18 pm

bbramble said:


Never is a very strong word. If your target has no console, how do you configure it?


get keyboard mouse and monitor.. simple as that.

anything else?

can't afford one?.. borrow, or lend the R-Pi to a friend who has and ask them to configure.

but this round in circles discussion has been around before.

answer a simple question what is your aversion to setting this up once you get it?

besides being lazy?

User avatar
jojopi
Posts: 3190
Joined: Tue Oct 11, 2011 8:38 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 9:31 pm

spurious said:

get keyboard mouse and monitor.. simple as that.
A better suggestion is probably to mount the image loopback before writing it to the SD card and change the passwords and make the service startup symlinks.  Not very convenient for Windows users, but they are likely not the ones who want SSH.

Assuming that a given distro image has OpenSSH installed but not running of course.

But it is silly to try to persuade people that their needs are less valid or that they are just being lazy.

timn
Posts: 17
Joined: Mon Jan 09, 2012 4:38 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 10:00 pm

I only ever use headless machines, other than a laptop or vmware console, so use ssh or rdp all the time; so for me I would welcome sshd enabled (ideally with root login disabled). However, your average punter is going to get a bit of a shock when some naughty person on their network (eg older brother) remotely logs in to their RPi and tinkers with it.

Presumably if the distro is pre-build, which it sounds like it is, then not only will the passwords be identical but so will the host's RSA fingerprint?

Hence, on balance, I think it needs to be disabled by default

bbramble
Posts: 60
Joined: Wed Jan 04, 2012 4:10 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 10:01 pm

spurious said:


answer a simple question what is your aversion to setting this up once you get it?

besides being lazy?



Not quite sure why you replied to me as I think we agree...

The way I see it, if you are bringing up for the first time the scenarios are:

1. You're anyone using HDMI and USB, so SSH concerns are irrelevant.

2. You are an IT professional configuring over SSH. Concerns are irrelevant.

3. You are a home user bringing it up behind your NAT router. SSH concerns are irrelevant.

4. You are an IT teacher configuring over SSH. If you are going to teach on the R-Pi, SSH concerns better be irrelevant.

5. You are an IT student. SSH concerns better be irrelevant because it's been pre-configured by 4.

Where is the problem?

bbramble
Posts: 60
Joined: Wed Jan 04, 2012 4:10 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 10:03 pm

timn said:


However, your average punter is going to get a bit of a shock when some naughty person on their network (eg older brother) remotely logs in to their RPi and tinkers with it.

Hence, on balance, I think it needs to be disabled by default
Why? They will have the same problem when they enable SSH to use the box if it is on the network. Is the "bad sibling" problem really a problem at all? What damage can they do to the clean install anyway? You can just re-copy the SD card. This is being talked up into a problem by people with more imagination than sense.

User avatar
Tass
Posts: 535
Joined: Sat Jan 21, 2012 11:15 am

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 10:37 pm

nmcc said:

Really, and how do you propose that a very small team of dedicated people working for nothing should deliver a preview edition of a distribution for a computer that isn't even available to buy yet?

Couldn't agree more! More to the point, what we're getting is a distro geared specifically towards the rpi.  This isn't a one-size-fits-all solutions for everyone.  As such I don't think we're really in a position to question how this is offered to us.  If you have the skills to tweak the system to do what you want, that's great.  If not, then you have to accept certain *initial* limitations and follow these steps:

1. Find a screen.  Any screen.  A TV, a monitor, something.  If you don't own one, borrow one.  If you don't have something that you can use and can't borrow something you can use, where are you getting the $35 from!?

timn
Posts: 17
Joined: Mon Jan 09, 2012 4:38 pm

Re: Preconfigured image with SSH and/or VNC

Fri Feb 24, 2012 10:43 pm

I agree that the sdcard can be re-imaged but that assumes some technical capability, and this device is aimed at the non-technical category of person who may have bought a pre-configured sdcard.

It just needs a simple script that configures sshd to automatically start, update the RSA fingerprint(?), and force a password change on the default logins.

Return to “General discussion”