Operating System - HP-UX
1822195 Members
3800 Online
109640 Solutions
New Discussion юеВ

Re: Telnet Commands to copy file from Host to Client

 

Telnet Commands to copy file from Host to Client

I am using a Windows Telnet Client and connect to an HPUX Machine.

What is the command sequence to copy a file on the HPUX machine to my windows client.

Also I may want to copy files from Windows to HPUX using Telnet.

Thanks
15 REPLIES 15
Steven E. Protter
Exalted Contributor

Re: Telnet Commands to copy file from Host to Client

Your best bet is to install a secure shell product on all devices.

Then you can actually share public keys and copy between sytems with the the scp command.

For HP-UX
http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA

For Windows:

http://www.networksimplicity.com/openssh

I'm attaching a document on generating and exchanging public keys.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com

Re: Telnet Commands to copy file from Host to Client

Thanks for the Information. However right now we do not worry about security. We just need to copy files.

Nevertheless we may use your information at a later stage in the project.

Thanks
Steven Sim Kok Leong
Honored Contributor

Re: Telnet Commands to copy file from Host to Client

Hi,

If you are not worried about security, and you want to copy a file from your HPUX server to your windows client, then you can use FTP to do that. TELNET is for remote host sessions rather than remote file transferring.

Hope this helps. Regards.

Steven Sim Kok Leong

Re: Telnet Commands to copy file from Host to Client

So there is NO way to do it with FTP.

Or os there a combination of commands to accomplish that.

Re: Telnet Commands to copy file from Host to Client

So there is NO way to do it with Telnet.

Or is there a combination of commands to accomplish that.

Michael Schulte zur Sur
Honored Contributor

Re: Telnet Commands to copy file from Host to Client

Hi,

as steven said, telnet just provides means for a remote connection. Anything else is provided by ftp or rcp. Any newer window version has a ftp client. Connect with ftp and copy the files or, if you need it nore often you could use samba of nfs to provide a network drive on the HPUX machine, then you can copy from/to HPUX like in windows.

greetings,

Michael
Sanjiv Sharma_1
Honored Contributor

Re: Telnet Commands to copy file from Host to Client

Hi Wolfgang,

ftp is the best option for you as you needn't have install any software.

From the Windows client (say)
c:\> cd
c:\> ftp
Give the username/password
Make it binary or ascii as per requirement.
Binary ( for data files)
Ascii ( for text files)
ftp> bin or ascii
ftp> get to copy the file from hpux box to windows client.
ftp> put to copy the file from windows clients to hpux box.

You can do "man ftp" on the hpux machine to learn more about ftp.

telnet opens a session for you in the unix box and may not help you to copy files.

hth.

hth.
Everything is possible
Naveej.K.A
Honored Contributor

Re: Telnet Commands to copy file from Host to Client

You could automate this by making a batch file in windows and even shedule it to run automatically using the windows scheduler.

All you need to do is craete a batch file say test.bat with contents as
ftp -s:test1 -i 21.1.1.1

where test1 is the file which contains info about the files to be transferrred and 21.1.1.1 is the IP address of the HPUX box.

and then the test1 will contain the following text.

testuser
testpass
bi
lcd c:\windows\desktop\folder
cd /var/tmp
mput file1
bye

testuser is the username through which the user will be logged into your hpux server while testpass is the password. You are transferring the file, "file1" from c:\windows\desktop\folder in the windows machine to /var/tmp in the unix box.

Better to make both the test.bat and test1 hidden. Hope this helps you

Regards
naveej
practice makes a man perfect!!!
Shaikh Imran
Honored Contributor

Re: Telnet Commands to copy file from Host to Client

Hi,
Try Using the attached file.
Install the software and try exploring it.
It also has ftp for windows.


Regards,

I'll sleep when i am dead.
Mark Grant
Honored Contributor

Re: Telnet Commands to copy file from Host to Client

Actually it is technically possible to copy files using telnet but only ascii files and it is not easy. You do it with logging in and doing a cat from the psuedo tty to a file and then on your client system squirt your data at the port. Finding the right port is the hard bit.

I used to do something similar all the time down serially attached modems. It is easier because your devices don't change each time you connect :)

Generally speaking though, there is absolutly no point, use "ftp" or "sftp" or "rcp"
Never preceed any demonstration with anything more predictive than "watch this"
Gerhard Roets
Esteemed Contributor

Re: Telnet Commands to copy file from Host to Client

Well if you do not use the windows "vanilla" telnet but hyperterm you could use zmodem transfer but for that you might need to install some 3rd party software

Regards
Gerhard
Alzhy
Honored Contributor

Re: Telnet Commands to copy file from Host to Client

Wolfgang,

Why not just activate SAMBA on your HPUX Machine. Once it is set up, your windows PC can see the user's home directory from Dindows and use normal FileManager/Explorer operations to copy files from/to the UNIX machine.

There should be plenty of info on easily configuring Samba (or CIFS/9000 server as HP bundles it..)
Hakuna Matata.
Ron Gordon
Advisor

Re: Telnet Commands to copy file from Host to Client

If you install NFS on the client (window machine) you can then just us the standard copy or move commands to access the files on the unix machine. (NFS comes standard on unix but must be purchased for windows)
Alzhy
Honored Contributor

Re: Telnet Commands to copy file from Host to Client

Gordon,

No need to purchase NFS (PC-NFS, ec..) software for Windows these days.. Microsoft is already offerring their SFU 3.5 (Services for Unix) product - free for Windows 2000 Pro, XP Pro and 2000 server licensees..

SFU has a built-in NFS client already if that is what certain sites require.

I would still prefer SMB though (Samba/CIFS).
Hakuna Matata.
Jonathan Smaby HPUX-Guy
Occasional Contributor

Re: Telnet Commands to copy file from Host to Client

I would use kermit to send files through your telnet session. Hyper-terminal will support kermit. HPUX comes with kermit by default. For Ymodem-G, Xmodem, and Zmodem transfer, you'll have to dig up someone's else's complied utilities. I've not had to use these protocols since the days of my Commodore C-64 in the old days of Bulletin Board Systems over Dial-up modem. For you youngsters, Yes.. there was life before the Internet, albeit primitive, with 300 Baud modems (Woo! Hoo!), and the lucky-ducks that worked for either Government or Universities and got to use Pine, Gopher, Archie, SIRS, and Mosiac. But I digress..

From your HPUX 'sh' shell:

# kermit
Good Morning!
C-Kermit 8.0.200, 12 Dec 2001, for HP-UX 11.00
Copyright (C) 1985, 2001,
Trustees of Columbia University in the City of New York.
Type ? or HELP for help.
(/) C-Kermit>

At the kermit prompt, just type:

send /BINARY /filepath/filename
send /TEXT /filepath/filename

e.g.

send /TEXT /etc/nsswitch.conf
send /BINARY /home/Jeff_Lynne/ELO_Xanadu.mp3

Then on Hyper-Terminal click pull-down menu "Transfer" then "Receive" with "kermit" protocol.

-or-

receive /TEXT filename
receive /BINARY filename

Then on Hyper-Terminal click pull-down menu "Transfer" then "Send" with "kermit" protocol.

You can do HELP send, HELP receive in kermit for more information.

Best of Luck!

Jonathan
The Claremont Colleges
Claremont, CA 91711