Best way to tranfer files to ZeroShell?

Home Page Forums Network Management ZeroShell Best way to tranfer files to ZeroShell?

This topic contains 8 replies, has 0 voices, and was last updated by  redtdi 7 years, 11 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #41452

    redtdi
    Member

    I am trying to use scp to transfer files to one of my ZeroShell boxes (the multilink ppp package) and was wondering what the best way to transfer files to ZeroShell is. When I use SCP from my Mac I get a “TERM environment variable not set” message even though it is.

    I have used the ftp client to transfer files at times but i really just want to be able to transfer files from my Mac directly to a ZeroShell box.

    Thanks,
    Ken

    #47564

    imported_fulvio
    Participant

    It is not possible to transfer files on Zeroshell using scp because the login shell of the user admin is not a standard shell, but a menu manager.

    One solution could be to use the nc (netcat) command. By way of example, make un netcat to listen to on tcp port 3000 of the Zeroshell with the command

    nc -l -p 3000 |tar xvf –

    and from your Mac/Linux transfer the files with the command

    nc IP_address 3000 < file.tar

    Regards
    Fulvio

    #47565

    tshiktshuk
    Member

    Hi I am new to Zeroshell and this is my first post on the forum.

    1. Thank you for zeroshell with the UMTS/HSDPA feature.

    It is the only linux distro I have found so far that connects my
    Telit MX20 usb modem (amoi vendor 1614 product 0800) to
    the web out of the box!!!

    Sadly my Ubuntu (8.10) installation cannot go anywhere else than to http://www.google.com with it for now.
    Thus I believe there is a bug somewhere in the zeroshell DNS setup.
    eg I havent touched any setting so it should work (eg- my eee-pc surfs all over the world, and also my Winborg Xp surfs anywhere i like it to.

    2. Why not incorporate the midnight commander shell with its beautyfull editor and the mc-serv?
    or
    3. What’s the problem with incorporating the kernel NFS daemon ?

    4. why use a DB database instead of just having the config files in text as they are and the basic executables packed in tarballs for a modular on the fly installation, kind of like SPB linux used to be? or like freesco had.
    Seems to me like having to passover the stream to get water…

    In this way anybody could write an add-on and put it out on the web or send it to you.

    5. I appreciate the web interface a lot,
    It is beautiful. But why not have DHCP for subnet 192.168.0.0 on by default ?
    Also I would have appreciated a more clearly visible stepping order in the setup.

    I hope you appreciate my feedback.

    Thank you a million times for your time and efforts in creating zeroshell I and my friends will have much enjoyment with it.[/quote]

    #47566

    kawarmc
    Member

    If you want to enable sftp transfers to Zeroshell, you can edit /etc/passwd and change the line for admin user to read like:

    admin:x:0:0:root:/root:/bin/bash

    This is just temporal, if you reboot the box, you’ll loose the changes made to /etc/passwd but it works if you only want to tranfer files from time to time.

    #47567

    Marcelo
    Member

    You could also ssh to ZS and sftp from there, instead, as it has the client installed.

    #47568

    atheling
    Member

    @redtdi wrote:

    I am trying to use scp to transfer files to one of my ZeroShell boxes (the multilink ppp package) and was wondering what the best way to transfer files to ZeroShell is. When I use SCP from my Mac I get a “TERM environment variable not set” message even though it is.

    I have used the ftp client to transfer files at times but i really just want to be able to transfer files from my Mac directly to a ZeroShell box.

    Thanks,
    Ken

    Here is what I have done to copy files to and from Zeroshell from my MacBook:

    1. Login in to Zeroshell and get to the bash prompt.
    2. Use the chsh command to change the admin shell program to /bin/bash

    Now you can use the standard scp program from the Mac Terminal to copy things to Zeroshell (or from Linux or Windows running Cygwin for that matter).

    However I go another step farther since I’m dealing with Linux boxes all day long at work:

    3. Download and install MacFuse from http://code.google.com/p/macfuse/
    4. Download and install MacFusion from http://www.macfusionapp.org/

    Between these two programs you have a nice UI to mount anything you can get to via SSH as a read/write file system in the Finder. Now you can mount the Zeroshell box and drag and drop files.

    #47569

    Lightyear
    Member

    What works for me is ssh-ing to ZeroShell and then go to the ZeroShell system prompt. From there you can scp to/from anywhere in your network that has password authentication.
    And, if you want key authentication, just scp the keys to ZeroShell.
    This is what I use to backup ZeroShell to a local server. And what I used to bring Joe to ZeroShell.
    Admittedly, mine is a Linux-only network, but from what I have heard from the Mac, it should be a piece o’cake.

    Hth.

    #47570

    jt
    Member

    I sometimes use a USB flash drive to copy files to or from zeroshell. (My sshd on my server only allows key pairs, so I can’t just scp without installing a key first)

    Insert the flash drive in a usb slot.
    ssh to zeroshell, or use the console, and select a shell prompt.
    Enter:
    dmesg

    My zeroshell shows this (I have zeroshell booting from a hard drive):
    …etc…
    scsi 2:0:0:0: Direct-Access USB 2.0 USB Flash Drive 0.00 PQ: 0 ANSI: 2
    sd 2:0:0:0: [sda] 7897088 512-byte hardware sectors (4043 MB)
    …etc…
    sd 2:0:0:0: [sda] Assuming drive cache: write through
    sda: sda1

    So, my zeroshell assigns the flash drive to be sda1. You may get a different sdxx name, depending on your hardware.

    Enter:
    mkdir /usbtemp {make a temporary mount point}
    mount /dev/sda1 /usbtemp {mount the flash drive}
    cd /usbtemp
    ls {see the files and directories that are on the flash drive}

    copy files as needed, using cp

    when done:
    cd /
    umount /usbtemp

    Now you can remove the flash drive from the usb slot.

    #47571

    Karachi123
    Member

    At least this solved my file sharing problem. thanks

    #47572

    _dan
    Member

    @kawarmc wrote:

    If you want to enable sftp transfers to Zeroshell, you can edit /etc/passwd and change the line for admin user to read like:

    admin:x:0:0:root:/root:/bin/bash

    I made this script to to shift between menu and bash, enable/disable SCP access.

    #!/bin/bash
    # Script to enable/disable SCP on ZeroShell

    ENABLE=/bin/bash
    DISABLE=/root/kerbynet.cgi/scripts/localman

    case $(awk -F: '/admin/{print $NF}' /etc/passwd) in
    $DISABLE ) chsh -s ${ENABLE} admin ;;
    $ENABLE ) chsh -s ${DISABLE} admin ;;
    esac

    This is my first post on this forum, thanks fulvio and ZeroShell community for this useful OS.

    Regards,
    Dan

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.