PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : sftp



real-challo
03.12.02, 23:36
Hallo !

Kennt sich jemand mit sftp aus ?

Ich möchte meine Kommandos in eine datei schreiben und möchte es per Script ausführen.

1. Wie sieht die batchdatei aus ?
2. wie rufe ich sftp auf ?

sftp -b datei funktioniert nicht !

Ich möchte soetwas wie
ftp -n < ftp-datei

Danke !

michael.sprick
03.12.02, 23:59
muss gehen! so stehts ja auch in den manpages...

sftp user@host -b komandos.txt



aber:

Auszug aus man-page:

Since it lacks user interaction it should be
used in conjunction with non‐interactive authentication. sftp
will abort if any of the following commands fail: get, put,
rename, ln, rm, mkdir, chdir, lchdir and lmkdir.

real-challo
04.12.02, 00:06
man page hin oder her - es geht nicht (zumindest nicht bei mir -b habe ich doch von der manpage)

Er liesst ja nicht einmal die Datei ein

Ich bekomme nur die Hilfe dazu :

sftp -b ./batchdatei
usage: sftp [-1Cv] [-b batchfile] [-F config] [-o option] [-s subsystem|path]
[-S program] [user@]host[:file [file]]

also muss ich das irgendwie anders aufrufen

(auch sftp user@domain -b batchfile funktioniert nicht)

maconey
04.12.02, 02:49
wer lesen kann ist klar im vorteil:

usage: sftp [-1Cv] [-b batchfile] [-F config] [-o option] [-s subsystem|path]
[-S program] [user@]_---->host<----_[:file [file]]

dein aufruf:

sftp -b ./batchdatei

wo ist da ein host?

versuchst mal mit

sftp -b ./batchdatei localhost