It is currently Sat Sep 04, 2010 2:53 am



Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Easy way to automatically install SSH
PostPosted: Fri Apr 09, 2010 11:20 am 
Offline
Administrator
Administrator

Joined: Tue Apr 06, 2010 8:42 pm
Posts: 351
# This script and associated files will install, configure and enable the SSH daemon
# upon boot of a base image install on an O2 Joggler updated as of 7pm 6 April 2010.
#
# Copy these files in to the root of a fat32 formated usb stick. Plug usb stick in to
# your Joggler and reboot. You should now be able to get root ssh access using the
# details below.
# The ssh daemon will start between reboots as this script patches the appropriate
# init.d script and comments out lines with the command "log_daemon_msg" which cause
# the rcS script to die (and thus not start sshd) when attempting to start S69boot.sshd.
#
# command: ssh letmeinssh@ip_of_joggler
# user = letmeinssh
# password = joggler1234
#
# This patch is compatible with any previous telnet patches you might have applied.
#
# If you have already enabled telnet:
# Once you have figured out how to change your password, and confirmed the you
# can still login via ssh with the new password, it is recommended you disable
# telnet the proper way which will allow you in the future to re-enable it
# should ssh become broken, you would do this using the other enable telnet
# file found on this site. I have not enabled telnet in this script because it is not
# neccessary when
#
# It is advised not to run this patch multiple times. So after patching delete the
# patch files from your usb stick to prevent accidently running it again.

http://stephenford.org/joggler/files/joggler_enable_ssh_v0.1.zip

I have also created a nice ubuntu netbook image that has not been customised. I will place this online shortly.

_________________
If you like my work, please consider shouting me a pint or some crisps here: http://stephenford.org/joggler/ http://twitter.com/narcotk


Top
 Profile  
 
 Post subject: Re: Easy way to automatically install SSH
PostPosted: Fri Apr 09, 2010 11:48 am 
Offline
Joggler Member
Joggler Member

Joined: Sat Apr 03, 2010 9:33 pm
Posts: 39
Okay,

I am going to be the Guinea Pig here! Will report back soon!

I presume I just put the USB stick in and boot the Joggler, then all the changes will be permanent and I will have SSH access from then on...

Also will this allow us to connect via WinSCP for example?

Many thanks for the hard work and effort!

Mark

EDIT 1: After wondering if this had worked I telnet'd into the Joggler and had a nosey around, seems that the script has not run on boot as there is no SHH folder in Var...

EDIT 2: Okay I booted again with the stick in and this time it seemed to work! Now to get WinSCP working

See my post here also: viewtopic.php?f=33&t=127&start=10

Thanks.


Top
 Profile  
 
 Post subject: Re: Easy way to automatically install SSH
PostPosted: Fri Apr 09, 2010 12:53 pm 
Offline
Joggler Member
Joggler Member

Joined: Sun Apr 04, 2010 4:36 pm
Posts: 32
Location: Bucks, UK
Followed your instructions in the opupdt.run file (as I like scripts ;)) and it looks like you need to start the sshd server twice (1st time it seems to fail). So maybe a reboot is required before it does actually work to the end user...

_________________
Awooga!!!


Top
 Profile  
 
 Post subject: Re: Easy way to automatically install SSH
PostPosted: Fri Apr 09, 2010 2:20 pm 
Offline
Administrator
Administrator

Joined: Tue Apr 06, 2010 8:42 pm
Posts: 351
Quinten wrote:
Followed your instructions in the opupdt.run file (as I like scripts ;)) and it looks like you need to start the sshd server twice (1st time it seems to fail). So maybe a reboot is required before it does actually work to the end user...


thats strange,

on line 33 it starts /usr/sbin/sshd by hand after doing what is needed to start sshd

then after that it simply modifies the s69boot.sshd script so that upon next boot it starts sshd

i tried it on two virginal jogglers (without even telnet access) and it worked

the other open is if you have telnet access just run all of the commands by hand

_________________
If you like my work, please consider shouting me a pint or some crisps here: http://stephenford.org/joggler/ http://twitter.com/narcotk


Top
 Profile  
 
 Post subject: Re: Easy way to automatically install SSH
PostPosted: Fri Apr 09, 2010 5:20 pm 
Offline
Joggler Member
Joggler Member

Joined: Fri Apr 09, 2010 1:45 am
Posts: 34
Location: Manchester, Uk
ok i have this installed and it will connect but the password isnt right and i dont understand how to change it?

when i try :passwd - i get told its too weak for a 9 letter password and then get(passwd: cannot update password file /etc/shadow)


Top
 Profile  
 
 Post subject: Re: Easy way to automatically install SSH
PostPosted: Fri Apr 09, 2010 5:42 pm 
Offline
Administrator
Administrator

Joined: Tue Apr 06, 2010 8:42 pm
Posts: 351
you need to change you password another way.

one was it to get a "hash" of a known password from another linux box and replace that string in the /etc/passwd file

the joggler stores the passwd in /etc/passwd rather than in /etc/shadow which the passwd app tries to use.



the_gman wrote:
ok i have this installed and it will connect but the password isnt right and i dont understand how to change it?

when i try :passwd - i get told its too weak for a 9 letter password and then get(passwd: cannot update password file /etc/shadow)

_________________
If you like my work, please consider shouting me a pint or some crisps here: http://stephenford.org/joggler/ http://twitter.com/narcotk


Top
 Profile  
 
 Post subject: Re: Easy way to automatically install SSH
PostPosted: Fri Apr 09, 2010 5:47 pm 
Offline
Joggler Member
Joggler Member

Joined: Fri Apr 09, 2010 1:45 am
Posts: 34
Location: Manchester, Uk
dysentry wrote:
you need to change you password another way.

one was it to get a "hash" of a known password from another linux box and replace that string in the /etc/passwd file

the joggler stores the passwd in /etc/passwd rather than in /etc/shadow which the passwd app tries to use.



ok so how do i edit the /etc/passed file? i have only had this thing a day sorry for the noob questions


Top
 Profile  
 
 Post subject: Re: Easy way to automatically install SSH
PostPosted: Fri Apr 09, 2010 10:29 pm 
Offline
Joggler User
Joggler User

Joined: Mon Apr 05, 2010 6:12 pm
Posts: 43
tried this and can now connect with WinSCp
If i try to move any files across i get the error:

Quote:
Cannot execute SCP to start transfer. Please make sure that SCP is installed on the server and path to it is included in PATH. You may also try SFTP instead of SCP.
Command failed with return code 127.


Is this supposed to happen ?


Top
 Profile  
 
 Post subject: Re: Easy way to automatically install SSH
PostPosted: Fri Apr 09, 2010 11:29 pm 
Offline

Joined: Mon Apr 05, 2010 11:22 am
Posts: 1
dysentry wrote:
you need to change you password another way.

one was it to get a "hash" of a known password from another linux box and replace that string in the /etc/passwd file

the joggler stores the passwd in /etc/passwd rather than in /etc/shadow which the passwd app tries to use.



the_gman wrote:
ok i have this installed and it will connect but the password isnt right and i dont understand how to change it?

when i try :passwd - i get told its too weak for a 9 letter password and then get(passwd: cannot update password file /etc/shadow)


You might want to try the cryptpw command, which creates the password hash for you, then paste this into your /etc/passwd file:

Code:
# cryptpw newpassword
$1$6H2cUv1h$WhCHkuVa71AvnvVTPNpJh/


For info, I used this command to create my new user in the /etc/passwd file, just edit the usernames and passwords to fit:

Code:
echo "john:`cryptpw iamdead`:0:0:John Doe:/:/bin/sh" >> /etc/passwd


Top
 Profile  
 
 Post subject: Re: Easy way to automatically install SSH
PostPosted: Sat Apr 10, 2010 10:40 am 
Offline
Administrator
Administrator

Joined: Tue Apr 06, 2010 8:42 pm
Posts: 351
yes this is meant to happen because you have not installed scp, only ssh.

follow the instructions here from step 2
viewtopic.php?f=33&t=208


i8cheesepie wrote:
tried this and can now connect with WinSCp
If i try to move any files across i get the error:

Quote:
Cannot execute SCP to start transfer. Please make sure that SCP is installed on the server and path to it is included in PATH. You may also try SFTP instead of SCP.
Command failed with return code 127.


Is this supposed to happen ?

_________________
If you like my work, please consider shouting me a pint or some crisps here: http://stephenford.org/joggler/ http://twitter.com/narcotk


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
© 2010 Joggler.Info
All times are UTC [ DST ]