BusyBox Linux FTP

mad4x4

Member
Join Date
Mar 2009
Location
ST CYrus
Posts
363
Trying to write a bash script for BusyBox and I can't get the FTP command to accept the Username and Password. I have tried using FTP UN:p[email protected] but it kicks that out if I try FTP 111.222.33.44 it always opens connection and prompts for password. But for current user rather than the User of the FTP server.

Note if I try commands One at a time from $>> prompt they work fine so I know my method is fundamentally correct.

Here is my PutFTP.sh
Code:
#!/bin/bash
ftp 111.222.33.44 <<EOF
UN
PassW12
prompt
hash
cd /STORE
mput /mnt/screen/*
bye
EOF

Passwords and IPs have been changed to protect the innocent
 
I did this a long time ago, have zero memory of how I got here, or even it it worked :) in fact it could be complete garbage, that is how confident I am :). My spelling hasn't got any better since then.
Code:
#!/bin/bash
# program to get AT data from a moedem and create a section of XML file

ftp -pinv -P 21 rigdata.mynetgear.com <<EOF
quote USER admin
quote PASS somepassword
cd /shares/USB_Storage/RigStatus/rigxmlfiles
put XML_Rig_Data.xml
close 
bye
EOF
I know that I gave up and went to Netcat (NC) and used the modem AT commands instead. I think you can use Netcat instead of FTP.
https://www.linode.com/docs/guides/netcat/
https://stackoverflow.com/questions/35470210/netcat-ftp-active-mode-file-transfer-not-working
 
Ok think I have found a solution, this is on a JMOBILE Screen and they have a function called ftpput, and it can be triggered by a button or a schedule etc. So when I print the report, after I will call FTPput . I already have the FTPPut (Button) working with a wildcard. so (if all else fails that will work ) .
 

Similar Topics

Hello all, I have a client that needs to externally control some valves at a small plant, nothing fancy. (for which I just need digital IO)...
Replies
16
Views
3,939
I have a linux server (on prosumer hardware), debian stretch 10. There was some utility works in my area and they hit the power line. The server...
Replies
15
Views
3,203
Hi there PLC aficionados, I have a quick question for you. Do you use Linux in your integrator/automation engineer/Technician role? If, yes which...
Replies
20
Views
8,356
Long time reader here but don't post much as I usually find the answers I need in the forum search. I am trying to create a dynamic selection...
Replies
11
Views
2,296
I can already tell this is taboo; but I am genuinely curious if anybody has attempted this via WINE or any other emulation software yet? I am a...
Replies
3
Views
3,056
Back
Top Bottom