Page 1 of 2

Enabling SSH and SCP - New Easy Method

Posted: Fri Apr 15, 2011 4:23 pm
by roobarb!
------------------------------------
SSH and SCP Enabler v1.03 - DOWNLOAD
5th November 2012
------------------------------------

I was interested in finding out how the Joggler's native operating system updates itself via USB devices, and in the process I've ended up writing a new SSH and SCP enabler with a few more features than previous versions.

This version enables both SSH (for command line login) and SCP (for secure file copying). It also includes a little script for changing the default password, and it can be run multiple times without risk of messing up your files. In fact, it's also the easiest way to reset your password should you forget it - simply attach the USB stick again and reboot.

It's also fine to use this to add SCP to a Joggler that has already had SSH enabled. Just be aware that your password will be reset and the username will change to 'joggler'.

Please ensure that you are running software version 26635 (June 25 2010) or 30291 (Oct 1 2011) before running this on your Joggler.

Preflight

If you are running version 30291 (recent OpenPeak release) then you need to enable updates via USB before this will work.

1. Log in to your Joggler over telnet with the username 'root'. There is no password.
2. Execute the following command:

Code: Select all

touch /etc/.usb-key
3. Power off your Joggler and follow the rest of these instructions.

Instructions

1. Download the zip file and copy the contents of the zip file to a FAT16 or FAT32 formatted USB stick.
2. Make sure you have copied all the files, including the '.sum' and '.usb-sum' files.
3. Plug the USB stick into a powered-off Joggler.
4. Power on the Joggler and wait until the normal interface appears.

Please consult the README in the zip file for more details.

When the script has been run, your Joggler should beep twice (although this doesn't always work!).

Usage

The default username and password are:

USERNAME: joggler
PASSWORD: joggler

You should now be able to get SSH and SCP access using a Terminal application or file transfer utility, eg.

Code: Select all

ssh joggler@<ip_of_your_joggler>
You can find your Joggler's IP address by using the Settings app and choosing 'Network'.

To change your password, keep the USB stick attached to the Joggler, log in using the details above and issue the following command:

Code: Select all

/mnt/setpasswd.sh <password>
This will change the Joggler user's password.

Re: Enabling SSH and SCP - New Easy Method

Posted: Mon Apr 25, 2011 10:18 am
by holmes
Hi roobarb!,

I tried this and nothing happened! Then I tried Plug'n Pimp and nothing without success (no mail in my incoming box). Could it be related to the fact I tried your script first?

Thanks.

Re: Enabling SSH and SCP - New Easy Method

Posted: Tue Apr 26, 2011 7:55 am
by roobarb!
No, this wouldn't make any difference to PnP. If nothing happened, are you sure your USB stick booted?

Re: Enabling SSH and SCP - New Easy Method

Posted: Tue Apr 26, 2011 9:56 am
by holmes
No I am not sure. Is there a way to be?
All I can say is that I tried with 5 different USB sticks (3 sticks, 1 SD player, 1 microSD player). 2 of them had been used previously to boot an OS (Ubuntu 10.10 + JoliOS). I placed as well images on one of them, booted the regular OS and displayed the images successfully.

I plan to reinstall the regular OS and to try again. Do you have a better idea?

Re: Enabling SSH and SCP - New Easy Method

Posted: Mon May 02, 2011 10:00 am
by roobarb!
Do you have the latest firmware running on the Joggler? I included a check that would prevent the script from running if the version number isn't 26635.S3, so if you're not running that version, nothing will happen.

Re: Enabling SSH and SCP - New Easy Method

Posted: Thu Jun 02, 2011 10:19 pm
by ddad0f3monsters
Sorry to drag up an old thread but i am having exactly the same problems as outlined above. I have tried 3 usb sticks and 1 micro sd with no luck, I have previously had Ubuntu and joli running on 2 of the sticks. I have tonight used the Joggler reflashing tool successfully using a USB stick that previously wouldnt work for the enabling SSH and SCP. with a freshly reflashed Joggler i have tried to use the tool again, again with the usb stick used to perform the reflash (so i know that USB works in the Joggler) again i cant get access to the joggler.
I didnt really want to install PnP but tried it anyway to see if that would work but that also wouldnt work with any of my USB media.

Im quite confused as to what to try next as i would ideally like to have Squeeezeplay running on the native OS.

Thanks

Re: Enabling SSH and SCP - New Easy Method

Posted: Fri Jun 03, 2011 12:21 am
by gegs
It really confuses me why so many people have had problems with USB sticks. I've never had a problem with any USB drive, stick, SD card or micro SD. I've used Kingston sticks, Sandisk, Transcend, and Lexar cards and a Seagate 250gb portable drive.

What I always do before writing any image or software with a boot sector is to delete all partitions using Windows' disk management tool (being VERY careful to pick the right drive). I then re-format the drive, stick or card as Fat32. Perhaps this makes the difference. Or perhaps I've just been lucky.

Re: Enabling SSH and SCP - New Easy Method

Posted: Fri Jun 03, 2011 9:50 am
by roobarb!
ddad0f3monsters wrote:Sorry to drag up an old thread but i am having exactly the same problems as outlined above.
No need to apologise - this is the right place! Much better than creating a new thread.
ddad0f3monsters wrote:I have tried 3 usb sticks and 1 micro sd with no luck, I have previously had Ubuntu and joli running on 2 of the sticks. I have tonight used the Joggler reflashing tool successfully using a USB stick that previously wouldnt work for the enabling SSH and SCP. with a freshly reflashed Joggler i have tried to use the tool again, again with the usb stick used to perform the reflash (so i know that USB works in the Joggler) again i cant get access to the joggler.

I didnt really want to install PnP but tried it anyway to see if that would work but that also wouldnt work with any of my USB media.

Im quite confused as to what to try next as i would ideally like to have Squeeezeplay running on the native OS.
It sounds to me like there's a problem with the format of the USB stick. Have you reformatted it completely as a FAT device? No other format (eg. NTFS, ext4, whatever) will work for enabling SSH or installing PnP as they both use the same method to get their files onto the Joggler.

Reformat the stick and give it a straightforward name like BADGER or KIPPER - all in capitals and with no spaces or funny characters. Then drop the sshscp.zip file onto it and extract the files They should all live in that top directory so you're left with a bunch of files next to the .zip file. If you're left with a .zip file and a directory containing the files, that's not correct.

Turn off Joggler, plug in stick, turn on Joggler, profit. In theory.

Re: Enabling SSH and SCP - New Easy Method

Posted: Fri Jun 03, 2011 3:55 pm
by ddad0f3monsters
Hi
Thanks for the reply, i have just given it a go. I used the same stick used for the reflash. I formatted the stick as a FAT device (as i have done each time) nammed the device KIPPER, downloaded a fresh copy of the zip directly to the stick, unzipped the contents all sat nicely next to the zip file. I the powered off the joggler inserted the stick and powered on with stick connected. upon homescreen appearing i opened Putty on my pc and tried to connect to the joggler using ssh joggler@192.XXX.2.100 after checking ip of joggler and get connection refused from putty and the window closes.
The only thing i had not done previously from your instructions roobarb was giving the stick a straightforard name. I know the joggler works with the usb stick from reflashing using the stick.

Im open to any and all suggestions now.
Thanks

Re: Enabling SSH and SCP - New Easy Method

Posted: Sat Jun 04, 2011 4:53 pm
by roobarb!
ddad0f3monsters wrote:Im open to any and all suggestions now.
Me too. All that sounds perfect, no idea why it's not working.

Could you try putting a JPEG image on the USB stick to see if you can open it through the USB button in the Photos app? Just want to see if the Joggler is able to see anything on the stick at all. Does your Joggler have any hardware modifications?

Re: Enabling SSH and SCP - New Easy Method

Posted: Thu Jun 16, 2011 8:00 pm
by ddad0f3monsters
sorry for the delay in replying been crazy busy.... I have tried to add a jpeg to the same usb pen drive and view it through photos app on native OS no luck.... nothing, joggler reports no supported files present.
I have also used SWMBO laptop to format and put the files on the drive with the same end result.

Re: Enabling SSH and SCP - New Easy Method

Posted: Tue Jun 21, 2011 4:39 pm
by roobarb!
ddad0f3monsters wrote:sorry for the delay in replying been crazy busy.... I have tried to add a jpeg to the same usb pen drive and view it through photos app on native OS no luck.... nothing, joggler reports no supported files present.
I have also used SWMBO laptop to format and put the files on the drive with the same end result.
Hmm. Well, I'm sorry, but I don't think it's anything I can troubleshoot from this end. Something funny's going on, but what it wouldn't appear to be related to this software. :|

Re: Enabling SSH and SCP - New Easy Method

Posted: Thu Nov 17, 2011 5:13 pm
by roobarb!
Updated - some minor tweaks and the Joggler should now beep twice at you if the script has been run.

Re: Enabling SSH and SCP - New Easy Method

Posted: Mon Nov 05, 2012 5:43 pm
by roobarb!
Updated again!

This new version will work on both version 26635 (June 25 2010) and 30291 (Oct 1 2011) - for 30291 you need to perform an extra step over telnet first, but other than that it will work perfectly.

Re: Enabling SSH and SCP - New Easy Method

Posted: Wed Apr 02, 2014 9:34 am
by jim_lewis1
Hi,

I tried running this from the USB as described and although I didn't get two beeps I can now SSH into my joggler (running squeezeplay OS)

However, I don't seem able to Telnet in, which I'd like to do in order to install PnPIII

Sorry if this isn't quite the right place, but any help gratefully received.

Thanks.

Re: Enabling SSH and SCP - New Easy Method

Posted: Wed Apr 02, 2014 11:31 am
by roobarb!
jim_lewis1 wrote:I tried running this from the USB as described and although I didn't get two beeps I can now SSH into my joggler (running squeezeplay OS)

However, I don't seem able to Telnet in, which I'd like to do in order to install PnPIII
If you can SSH in, you don't need telnet. Just run your commands from the command line over secure shell.

I deliberately didn't include any telnet stuff in the enabler - why use an insecure method when the secure method works? ;)

Re: Enabling SSH and SCP - New Easy Method

Posted: Wed Apr 02, 2014 2:26 pm
by jim_lewis1
As mentioned elsewhere I've worked round this now, but for future reference, in SSH instead of Telnet you say:
'Just run your commands from the command line over secure shell'
I'm a complete Linux noob, so whereas in Telnet as root user i'd do:
cd /mnt/files (etc.)
What would I do in SSH? (Word for word please I know nothing!)

Re: Enabling SSH and SCP - New Easy Method

Posted: Wed Apr 02, 2014 2:39 pm
by JimbobVFR400
SSH is merely the method used to connect to the terminal, once there the commands are the same.

Re: Enabling SSH and SCP - New Easy Method

Posted: Wed Apr 02, 2014 3:58 pm
by jim_lewis1
ok, but in SSH I don't think I'm root user, so do I need to SUDO or something?

Re: Enabling SSH and SCP - New Easy Method

Posted: Wed Apr 02, 2014 4:40 pm
by JimbobVFR400
It depends which user you logon as, personally I use the joggler user then start commands with sudo if necessary.

You could also logon as root then there's no need for sudo, the command su will give root privileges for that session or simply use root as the user name when logging on.