WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to enable telnet in pxebooted core?  (Read 13664 times)

Offline lid

  • Jr. Member
  • **
  • Posts: 62
How to enable telnet in pxebooted core?
« on: September 03, 2012, 08:34:10 PM »

Hi,

I am new to tinycore Linux.  I downloaded the minimal image Core-current.iso and used pxeboot to boot it up in RAM in a diskless box.  By default I was dropped into the "tc" account without passwd.  Networking worked just fine.

However I 'd like to log into the box remotely. So I tried telnet but the connection was refused.  I searched the forum and found this post:

http://forum.tinycorelinux.net/index.php/topic,11430.msg60419.html#msg60419

However my situation might be different. I don't have /usr/local/sbin/telnetd. Instead I have /usr/sbin/inetd (Busybox link). I am not sure why this post asked me to put this line in /etc/inetd.conf file:

telnet stream tcp nowait root /usr/local/sbin/telnetd telnetd

The connection still was refused after I did this:
/usr/sbin/inetd /etc/inetd.conf

Any ideas?

David

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How to enable telnet in pxebooted core?
« Reply #1 on: September 03, 2012, 08:42:40 PM »
You need to spend some time in the wiki reading about installing packages, and persistence.

Offline lid

  • Jr. Member
  • **
  • Posts: 62
Re: How to enable telnet in pxebooted core?
« Reply #2 on: September 04, 2012, 09:29:39 AM »
Thanks for the reminder.

My microcore doesn't have 'ab' command. Maybe it's the smallest package in tinycore Linux.
I did find tce-load tool and used it to download and installed "sshd".  It's nice tool! So this solved my remote login issue.

Since my box is diskless and I booted everything into RAM so there is no persistent storage for my sshd files.  If sshd should survive the reboots, then I will have to package them into the core.gz.  I haven't found anything in wiki how to do this yet.  Please let me know if you have a link.

David

Offline ananix

  • Full Member
  • ***
  • Posts: 174
Re: How to enable telnet in pxebooted core?
« Reply #3 on: September 04, 2012, 09:44:33 AM »
If you boot from USB (writable media) you could add the files in question to your /opt/.filetool after changes run backup and they will now be in mydata.tgz extracted at boot. If from CDROM you have to do a remaster forinstance with ezremaster.
Depending on your boot media and how you "loaded" sshd the package will still be availble in /opt/optional after boot as it default also backedup maybe just adding it to onboot.lst will do the job you are asking.
« Last Edit: September 04, 2012, 09:49:14 AM by ananix »

Offline ananix

  • Full Member
  • ***
  • Posts: 174
Re: How to enable telnet in pxebooted core?
« Reply #4 on: September 04, 2012, 10:20:08 AM »
sorry pxeboot i forgot, you have to do a remaster for you server.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How to enable telnet in pxebooted core?
« Reply #5 on: September 04, 2012, 10:57:00 AM »
I see no reason for a remaster.
http://wiki.tinycorelinux.net/wiki:netbooting

In 4.6, ab has been renamed tce-ab.
You can always use tce-load.
« Last Edit: September 04, 2012, 10:58:59 AM by gerald_clark »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: How to enable telnet in pxebooted core?
« Reply #6 on: September 04, 2012, 09:48:35 PM »
On a sidenote, you might look into using dropbear instead of sshd for a lighter footprint.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
Re: How to enable telnet in pxebooted core?
« Reply #7 on: September 07, 2012, 11:19:03 AM »
@lid: If you want a quick&dirty way to setup a login server, you can download
http://landley.net/aboriginal/downloads/binaries/extras/

then chmod +x it and sudo ./busybox-i486 telnetd.

This will save the work on inetd and ssh encryption, which is a nuisance in some situations.

     [EDIT]: Edited URL due to a possible forum policy violation. Rich
« Last Edit: September 08, 2012, 12:40:47 AM by Rich »

Offline lid

  • Jr. Member
  • **
  • Posts: 62
Re: How to enable telnet in pxebooted core?
« Reply #8 on: September 08, 2012, 12:17:41 AM »
@lid: If you want a quick&dirty way to setup a login server, you can download
http://landley.net/aboriginal/downloads/binaries/extras/

then chmod +x it and sudo ./busybox-i486 telnetd.

This will save the work on inetd and ssh encryption, which is a nuisance in some situations.

Nice, this works for me too. Is this a new busybox version that the one comes with microcore?

[EDIT]: Edited URL due to a possible forum policy violation. Rich
« Last Edit: September 08, 2012, 12:42:31 AM by Rich »

Offline lid

  • Jr. Member
  • **
  • Posts: 62
Re: How to enable telnet in pxebooted core?
« Reply #9 on: September 08, 2012, 12:27:36 AM »
I see no reason for a remaster.
http://wiki.tinycorelinux.net/wiki:netbooting

In 4.6, ab has been renamed tce-ab.
You can always use tce-load.

I like the way suggested in the above link to package the tcz extensions as a separate CPIO archive and booted it together with the native initrd in the microcore (see: http://wiki.tinycorelinux.net/wiki:netbooting#putting_it_all_together_another_way).

But my question really is how to locate all dependencies and put them together to create such a CPIO archive. For example openssh.tcz has the following dependencies:

openssl-0.9.8.tcz and gcc_libs.tcz.

And they in turn might depend on others so on so forth.

Do I need to manually put the openssl and gcc_libs plus others together with openssh in the archive? Or I only need to take care of openssh and let the dependencies be taken care magically at boot time?

David


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11704
Re: How to enable telnet in pxebooted core?
« Reply #10 on: September 08, 2012, 12:50:25 AM »
Hi caminati
The way I read the forum rules, you may not post direct links to binaries. I've modified your link to point to
the directory instead.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How to enable telnet in pxebooted core?
« Reply #11 on: September 08, 2012, 12:59:31 AM »
Use an NFS tce directory and you can use Apps to install extensions and set them to onboot.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: How to enable telnet in pxebooted core?
« Reply #12 on: September 08, 2012, 03:43:56 AM »
Or view the .tree files, which contain all dependencies.
The only barriers that can stop you are the ones you create yourself.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: How to enable telnet in pxebooted core?
« Reply #13 on: September 08, 2012, 05:49:21 PM »
Or see scripting subforum for a script to download extensions with dependencies.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline genec

  • Full Member
  • ***
  • Posts: 240
Re: How to enable telnet in pxebooted core?
« Reply #14 on: September 10, 2012, 09:25:16 PM »
sorry pxeboot i forgot, you have to do a remaster for you server.
I'd personally lean towards a dynamic remaster (see wiki) AND you will likely want to configure passwd appropriately.  There are boot codes for passwd manipulation.  I find dynamic remaster allows me to easily update the core.gz as-is then the requisite extensions without doing a full remaster and allows me to reuse the same files for multiple boot scenarios.