ssh server

New features which should be implemented in Porteus Kiosk Edition and the kiosk wizard.
Forum rules
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.html
wsteven
Black ninja
Black ninja
Posts: 40
Joined: 21 Aug 2013, 10:01
Distribution: lubuntu
Location: Rennes

ssh server

Post#1 by wsteven » 22 Aug 2013, 14:43

Hi there, don't know where to put this.

I was wondering if there's anyway of intalling a ssh server on the kiosk release? The goal is to be able to reboot or kill a process without having to walk ;)
I don't know slackware, I read about modules, can someone tell me a bit more about it?
Thanks in advance,
Steven

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: ssh server

Post#2 by fanthom » 22 Aug 2013, 18:41

hard task to accomplish but you could:
- install (or run in vbox) porteus standard edition
- grab openssh package from slackware-14.0 repo and convert to xzm with txz2xzm script
- disable firewall through kiosk wizard
- boot kiosk to text mode (described in Kiosk FAQ)
- check if you can start ssh server (probably you'll have to resolve missing deps)
- if you manage to get it to work then start ssh through /etc/rc.d/rc.local

if you are not experienced linux user then i would give up.
Please add [Solved] to your thread title if the solution was found.

patx
White ninja
White ninja
Posts: 26
Joined: 22 Aug 2013, 13:30
Distribution: kiosk
Location: canada

Re: ssh server

Post#3 by patx » 22 Aug 2013, 23:10

Its a nice feature that i would like to see either, i will give it a try somewhere tomorrow or saturday and post the modules here if i succeed.

patx
White ninja
White ninja
Posts: 26
Joined: 22 Aug 2013, 13:30
Distribution: kiosk
Location: canada

Re: ssh server

Post#4 by patx » 23 Aug 2013, 01:39

Here is the first part, making the module...

http://www.mediafire.com/?x2jpanr6pcwj96g

enough for tonight. c u all tomorrow :D !!!

wsteven
Black ninja
Black ninja
Posts: 40
Joined: 21 Aug 2013, 10:01
Distribution: lubuntu
Location: Rennes

Re: ssh server

Post#5 by wsteven » 23 Aug 2013, 10:45

Hey, I created the module using the desktop version. Tested there, was working fine.
I copied libssh and openssh to the module directory before recreating the iso. Now, X isn't starting and can't even log to shell, as if my password changed :%)
Doesn't make sense to me ^^

wsteven
Black ninja
Black ninja
Posts: 40
Joined: 21 Aug 2013, 10:01
Distribution: lubuntu
Location: Rennes

Re: ssh server

Post#6 by wsteven » 23 Aug 2013, 11:05

copied inittab, passwd and shadow to rootcopy/, eveything is back to normal... Now time to deal with deps ;)

wsteven
Black ninja
Black ninja
Posts: 40
Joined: 21 Aug 2013, 10:01
Distribution: lubuntu
Location: Rennes

Re: ssh server

Post#7 by wsteven » 23 Aug 2013, 13:35

Ok, ssh server is working now. If interested, here are the modules : http://dl.free.fr/iN5CF7xML

Now I log on with putty and get :

Code: Select all

login as: root
root@192.168.56.102's password:
Server refused to allocate pty
I don't seem to find an answer on how to add ptys, any idea?
Thanks,
Steven

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: ssh server

Post#8 by fanthom » 23 Aug 2013, 13:51

kiosk kernel is compiled without support for virtual terminals (security wise) so you have to use kernel from our 2.1 32bit standard edition.
please copy vmlinuz and 000-kernel.xzm to kiosk ISO and hopefully this will do it.

if you want pxe boot with new kernel then you'll have to replace all drivers in initrdpxe.xz respectively.
Please add [Solved] to your thread title if the solution was found.

wsteven
Black ninja
Black ninja
Posts: 40
Joined: 21 Aug 2013, 10:01
Distribution: lubuntu
Location: Rennes

Re: ssh server

Post#9 by wsteven » 23 Aug 2013, 14:53

Same problem :(
No need for pxe.

Thx,
Steven

patx
White ninja
White ninja
Posts: 26
Joined: 22 Aug 2013, 13:30
Distribution: kiosk
Location: canada

Re: ssh server

Post#10 by patx » 23 Aug 2013, 15:04

WoW !!! it move fast into the porteus world !!!

here are my modules :

http://www.mediafire.com/?6z32ligkcu7a8db

@wsteven: are you french ?

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: ssh server

Post#11 by fanthom » 23 Aug 2013, 15:19

once kernel is swapped you have to mount devpts, add this code to rc.local:

Code: Select all

mkdir /dev/pts
mount -o mode=0620,gid=5 -nt devpts devpts /dev/pts
connecting with kiosk through ssh works here so must also for you :)
Please add [Solved] to your thread title if the solution was found.

wsteven
Black ninja
Black ninja
Posts: 40
Joined: 21 Aug 2013, 10:01
Distribution: lubuntu
Location: Rennes

Re: ssh server

Post#12 by wsteven » 23 Aug 2013, 15:50

patx wrote:
@wsteven: are you french ?
yes :)

fanthom, you rock! I'll try this on monday, week-end time :beer:

patx
White ninja
White ninja
Posts: 26
Joined: 22 Aug 2013, 13:30
Distribution: kiosk
Location: canada

Re: ssh server

Post#13 by patx » 23 Aug 2013, 18:32

Thankx fanthom as wsteven said you ROCK !!!

It does work /etc/rc.d/rc.local contains :

Code: Select all

mkdir /dev/pts
mount -o mode=0620,gid=5 -nt devpts devpts /dev/pts
/etc/rc.d/rc.sshd start


@wsteven: moi aussi :D

patx
White ninja
White ninja
Posts: 26
Joined: 22 Aug 2013, 13:30
Distribution: kiosk
Location: canada

Re: ssh server

Post#14 by patx » 23 Aug 2013, 20:19

If i change run level back to 4 on the inittab file, i cannot login with ssh as if the root passwd changed. Any clue on this ?

Just changing run level back to 3 and rebuild w/o doing anything else fix it, i can login again.

patx
White ninja
White ninja
Posts: 26
Joined: 22 Aug 2013, 13:30
Distribution: kiosk
Location: canada

Re: ssh server

Post#15 by patx » 24 Aug 2013, 00:54

Hello again,

It seem to be related to the X server, if i leave it in run level 4 and add

Code: Select all

/etc/rc.d/rc.4 start & > /dev/null
to rc.local, the X server start but from then i cannot login anymore...

I also can login with ssh, launch the cmd above by hand and all works just fine, if i log out from SSH after killing the X server, i cannot login again using ssh or kiosk shell, it says "permission denied".

Locked