Click to See Complete Forum and Search --> : Sending a file over remote login?


ndogg
11-09-2000, 12:37 PM
Is it possible to send a file over a remote login session, say through telnet or ssh? This would really make my life easier if there is a way to do this.

------------------
Too much Sun can give you cancer. Windows break too easily.
Apples/Macintoshes can rot. BSD... sounds too much like LSD.
Penguins are the only animals sophisticated enough to wear a
tuxedo.


Linux, the only one with the Penguin.


http://ndogg.n3.net

DrDrake
11-09-2000, 12:41 PM
Well maybe soem kinda Zmodem protocol deal? Anyone else have any input? I havent found a way, well I have and its called ftp http://www.linuxnewbie.org/ubb/smile.gif

------------------
"The streets will flow with the blood of the non-believers!"

www.mainframex.com

mattmorrow
11-09-2000, 02:28 PM
Not telnet or ssh, but 2 other methods:

rsh:
(uses ksh, but you can use any shell)
Do something on every machine:

for machine in `cat /etc/hosts.equiv`
> do
> ping $machine 2
> if [[ $? == 0 ]] then "rsh $machine ls -lisa /usr/lib/libarm*.*"
> fi
> done


(batch or scripted) ftp:
ftp -n < batch.ftp

to avoid the -n option, you need to populate the local .netrc file.
ftp man says look at netrc(5), but I couldn't find any netrc man pages,
so just using -n.

Here's the batch file:

debug
open
200.200.175.1
user YourNameHere YourPasswordHere
case
prompt off
ascii
cd /home/The_target_dir
lcd /home/The source_dir
get Linux.txt
bye

HTH, matt

[This message has been edited by mattmorrow (edited 09 November 2000).]