› Forums › Network Management › ZeroShell › Best way to tranfer files to ZeroShell?
- This topic is empty.
-
AuthorPosts
-
February 5, 2009 at 3:03 pm #41452
redtdi
MemberI 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,
KenFebruary 5, 2009 at 6:03 pm #47564imported_fulvio
ParticipantIt 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
FulvioFebruary 17, 2009 at 10:38 am #47565tshiktshuk
MemberHi 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]
February 7, 2010 at 7:02 pm #47566kawarmc
MemberIf 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.
February 7, 2010 at 8:51 pm #47567Marcelo
MemberYou could also ssh to ZS and sftp from there, instead, as it has the client installed.
February 7, 2010 at 9:51 pm #47568atheling
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,
KenHere 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/bashNow 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.
February 8, 2010 at 3:06 am #47569Lightyear
MemberWhat 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.
March 16, 2010 at 6:55 pm #47570jt
MemberI 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:
dmesgMy 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: sda1So, 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 /usbtempNow you can remove the flash drive from the usb slot.
March 25, 2010 at 12:41 am #47571Karachi123
MemberAt least this solved my file sharing problem. thanks
May 15, 2011 at 2:29 am #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 -
AuthorPosts
- You must be logged in to reply to this topic.