Upload / Download file

Upload / Download file

Post by yoeyy » Fri, 08 Oct 2004 19:18:54

I run UX 11 and the user use the Reflection/Netterm emulator , to
telnet to the unix server . In Reflection , user can use the
proprietary protocol "unxlink" to upload/download files between dos
and unix , but netterm don't support "unxlink" , could suggest what
protocol can use for upload/download files ? I tried zmodem can
download but can't upload . thx.

the ftp is good but I don't want the user interactive to login the
server and input the data , I want the system can process the upload
automatically , just like use zmodem / kernel etc.

example :
#sz abc.txt

then the abc.txt will download from the shell to dos and no need to
input anything and ask for login , as I will run it by program , so I
can't use ftp .
could suggest what is the good solution ? thx.

Upload / Download file

Post by Laurenz Al » Fri, 08 Oct 2004 21:23:50

I don't know if that is what you are looking for, but what about getting
ncftp and giving the user just the 'ncftpput' and 'ncftpget' executables?
You could even wrap them in a shell script if the host is always the same.

Laurenz Albe


Upload / Download file

Post by spamtotras » Sat, 09 Oct 2004 06:39:33

You use 'sz' to send and 'rz' to receive...

I haven't used Reflection in a long time, but I know this works because I used
to do the same thing:

Reflection -> HP-UX with zmodem
HP-UX -> Reflection with zmodem

You'll want to investigate kermit in conjunction with zmodem... 'man kermit'.


Upload / Download file

Post by c0ldbyt » Tue, 19 Oct 2004 09:29:01

You could also setup a secure kermit-sshsub through sshd on your systems
and have uploads taken care of and proccesed by scripts to do whatever you
want to do with them. Kermit is a pretty scriptable program and nice subsystem
for ssh. Link: http://www.yqcomputer.com/
collections they have there as well should set you up pretty well.

-- c0ldbyte

Upload / Download file

Post by Birger Bli » Wed, 20 Oct 2004 23:41:39

Just create a file .netrc

Then add a line:
machine <host> login <login> password <password>

where <host>,<login>,<password> is replaced with your host,login,password.

Then protect the file for reading/writing by others, or ftp will refuse to use it.
chmod go-rw .netrc

Now you can do ftp <host> and don't need to login.

in a script:

ftp <host> << EOF
cd somewhere
lcd somewhere
put something

Or you can add a macro in .netrc
macdef sendit
cd somewhere
lcd somewhere
put something
<empty line>

and then do
echo \$sendit | ftp <host>

If you do a macro with name init, it will run by default.