Hallo zusammen,
aktuell rufe ich mit einer DS720+ per Task-Schedule und schlankem "wGet" user script alle 5min kleine XMLs per FTP ab. Nach einem Firmware update der Quelle (Sortier Maschine mit Linux basis) wird mir nun nur noch SFTP angeboten. Macht in Sachen Security sicherlich Sinn ABER das ganze Netzwerk ist eh offline UND ich habe keine Chance SSH keys auf der Sortier-Maschine zu installieren...
Welche Möglichkeiten hab ich? RSYNC ohne SSH geht meine ich nicht... Ich hab mit LFTP rumgebastelt bin aber auch kein Script Experte (wobei das eigentlich einfach aussieht). Den Zugang hab ich mit FileZilla getestet (USER, PASSW, HOST, 22). Oder ist das zu komplex um direkt aus dem Task-Schedule Window ausgeführt zu werden. Performance ist ebenfalls keine Sorge wir reden von ca. 20 File je 2KB. Muss nur sauber und stetig laufen.
Gruß + Danke für Eure Hilfe
Skript unten:
aktuell rufe ich mit einer DS720+ per Task-Schedule und schlankem "wGet" user script alle 5min kleine XMLs per FTP ab. Nach einem Firmware update der Quelle (Sortier Maschine mit Linux basis) wird mir nun nur noch SFTP angeboten. Macht in Sachen Security sicherlich Sinn ABER das ganze Netzwerk ist eh offline UND ich habe keine Chance SSH keys auf der Sortier-Maschine zu installieren...
Welche Möglichkeiten hab ich? RSYNC ohne SSH geht meine ich nicht... Ich hab mit LFTP rumgebastelt bin aber auch kein Script Experte (wobei das eigentlich einfach aussieht). Den Zugang hab ich mit FileZilla getestet (USER, PASSW, HOST, 22). Oder ist das zu komplex um direkt aus dem Task-Schedule Window ausgeführt zu werden. Performance ist ebenfalls keine Sorge wir reden von ca. 20 File je 2KB. Muss nur sauber und stetig laufen.
Gruß + Danke für Eure Hilfe
Skript unten:
- #!/bin/bash
- #login information for your remote host, no quotes
- login=xxxxx
- #password information for your remote host, no quotes
- pass=xxxxx
- #host info for your remote host. include full URL standard format is sftp://ftp.servername.com
- host=sftp://xxxxx.xxxxx.xxxxx
- #remote location where your finished downloads are on your seedbox
- remote_dir=/where/your/files/are/on/remote/host
- #local directory where you are storing your downloads for further processing
- local_dir=/where/you/want/the/files/to/go/locally
- # Runs the lftp to sync, please amend xxxxx to your ssh / sftp port if required or remove the -p xxxxx option altogether if desired.
- # command use-pget-n=20 uses 20 threads, command -P1 does one file at a time. Amend as needed keeping in mind not flooding your remote host with too many connections.
- # command --log=lftp_logs.log will write to the log location you specify, for troubleshooting. Remove if not needed.
- lftp -u $login,$pass $host -p xxxxx << EOF
- mirror --use-pget-n=20 -P1 -c --log=lftp_logs.log $remote_dir $local_dir
- quit
- EOF