ssh Exit Code 255 7.80 RC1
Moderator: Lancom-Systems Moderatoren
ssh Exit Code 255 7.80 RC1
Hallo,
ich versuche gerade via applescript und ssh ein Programm zu schreiben um die Rufumleitung in der Praxis meiner Frau für die Damen bedienbar zu machen.
Leider bekomme ich bei jeglichen ssh Aufruf immer eine Exit Code von 255 vom LCOS zurück. Bei einem ssh zu einer anderen Box kommt Exit Code 0.
Der Rest funktioniert mit den Zertifikat und:
ssh wireless1 dir '/Setup/Voice-Call-Manager/Call-Router/Call-Routing/15 "" "" "" "" 12'
prima.
Kann das bitte geändert werden?
P.S. Gibt es dafür schon etwas was ich nicht kenne und nicht mit kryptischen Tastenkombinationen zu bedienen ist?
Vielen Dank im Voraus
Henri
macbookpro:desktop$ ssh wireless1
#
| LANCOM 1823 VoIP (Annex B)
| Ver. 7.80.0058RC1 / 18.11.2009 / 6.26b/E74.02.54
| SN.
| Copyright (c) LANCOM Systems
Wireless1, Connection No.: 002 (LAN)
henri@Wireless1:/
> exit
Goodbye
Connection to wireless1 closed.
macbookpro:desktop henri$ echo $?
255
ich versuche gerade via applescript und ssh ein Programm zu schreiben um die Rufumleitung in der Praxis meiner Frau für die Damen bedienbar zu machen.
Leider bekomme ich bei jeglichen ssh Aufruf immer eine Exit Code von 255 vom LCOS zurück. Bei einem ssh zu einer anderen Box kommt Exit Code 0.
Der Rest funktioniert mit den Zertifikat und:
ssh wireless1 dir '/Setup/Voice-Call-Manager/Call-Router/Call-Routing/15 "" "" "" "" 12'
prima.
Kann das bitte geändert werden?
P.S. Gibt es dafür schon etwas was ich nicht kenne und nicht mit kryptischen Tastenkombinationen zu bedienen ist?
Vielen Dank im Voraus
Henri
macbookpro:desktop$ ssh wireless1
#
| LANCOM 1823 VoIP (Annex B)
| Ver. 7.80.0058RC1 / 18.11.2009 / 6.26b/E74.02.54
| SN.
| Copyright (c) LANCOM Systems
Wireless1, Connection No.: 002 (LAN)
henri@Wireless1:/
> exit
Goodbye
Connection to wireless1 closed.
macbookpro:desktop henri$ echo $?
255
Hallo,
ich hab's mit dem Suse SLES 11, Redhat RHEL5 und MacOS 10.6. Openssh versucht und alle bringen einen Exit Code 255.
Ich suche noch ein wenig nach der offiziellen Doku aber das bedeutet wohl:
ssh exits with the exit status of the remote command or with 255
if an error occurred.
Eigentlich ist mir das auch egal, ich habe nur der Problem, dass:
do shell script "ssh wireless1 dir '/Setup/Voice-Call-Manager/Call-Router/Call-Routing/15" with administrator privileges
einen Error wirft, da ssh den Exit Code 255 meldet und daher das Ergebnis nicht in "result" übergeben wird.
Somit funktioniert es leider nicht wie gewünscht.
Vielen Dank im Voraus
Henri
ich hab's mit dem Suse SLES 11, Redhat RHEL5 und MacOS 10.6. Openssh versucht und alle bringen einen Exit Code 255.
Ich suche noch ein wenig nach der offiziellen Doku aber das bedeutet wohl:
ssh exits with the exit status of the remote command or with 255
if an error occurred.
Eigentlich ist mir das auch egal, ich habe nur der Problem, dass:
do shell script "ssh wireless1 dir '/Setup/Voice-Call-Manager/Call-Router/Call-Routing/15" with administrator privileges
einen Error wirft, da ssh den Exit Code 255 meldet und daher das Ergebnis nicht in "result" übergeben wird.
Somit funktioniert es leider nicht wie gewünscht.
Vielen Dank im Voraus
Henri
Moin,
ich glaube, wir reden aneinander vorbei...Der LCOS-SSH-Server liefert keinen
Exit-Status zurück (also Exit-Status undefiniert), egal ob die Verbindung regulär
oder irregulär beendet wird, und der OpenSSH-Client macht daraus
offensichtlich eine 255. Das Problem ist, daß die LCOS-CLI keine Exit-Codes im
'Unix-üblichen' Sinne kennt. Man könnte hart eine Null zurückgeben, aber das
wäre auch nicht im Sinne des Erfinders, weil man ja durchaus wissen möchte,
ob ein Kommando fehlgeschlagen ist oder nicht...
Formulieren wir das mal soherum: da vermutlich im Produktmanagement niemand
eine richtige Priorität sehen wird, wäre es Dir eine Flasche Havana Club wert,
wenn es zum nächsten RC gelöst ist?
Gruß Alfred
ich glaube, wir reden aneinander vorbei...Der LCOS-SSH-Server liefert keinen
Exit-Status zurück (also Exit-Status undefiniert), egal ob die Verbindung regulär
oder irregulär beendet wird, und der OpenSSH-Client macht daraus
offensichtlich eine 255. Das Problem ist, daß die LCOS-CLI keine Exit-Codes im
'Unix-üblichen' Sinne kennt. Man könnte hart eine Null zurückgeben, aber das
wäre auch nicht im Sinne des Erfinders, weil man ja durchaus wissen möchte,
ob ein Kommando fehlgeschlagen ist oder nicht...
Formulieren wir das mal soherum: da vermutlich im Produktmanagement niemand
eine richtige Priorität sehen wird, wäre es Dir eine Flasche Havana Club wert,
wenn es zum nächsten RC gelöst ist?
Gruß Alfred
lool, Du kannst bald nen Spirituosen-Laden aufmachen.Formulieren wir das mal soherum: da vermutlich im Produktmanagement niemand
eine richtige Priorität sehen wird, wäre es Dir eine Flasche Havana Club wert,
wenn es zum nächsten RC gelöst ist?

Dr.House hat geschrieben:Dr. House: Du bist geheilt. Steh auf und wandle.
Patient: Sind Sie geisteskrank?
Dr. House: In der Bibel sagen die Leute schlicht "Ja, Herr" und verfallen dann ins Lobpreisen.
Hallo,
jetzt funktioniert's.
So etwas als Standard Funktion (z.B. via WEB wäre schön).
set user to "henrihoffmann"
set fritzbox to 20
set lancom to "router.praxis.intra"
set phonelist to {"AB21", "AB22", "AB23", "AB24", "AB24", "Keine"}
set header to "LANCOM Anrufbeantworter "
on replaceText(find, replace, subject)
set prevTIDs to text item delimiters of AppleScript
set text item delimiters of AppleScript to find
set subject to text items of subject
set text item delimiters of AppleScript to replace
set subject to "" & subject
set text item delimiters of AppleScript to prevTIDs
return subject
end replaceText
set selected to choose from list phonelist with prompt "Rufumleitung" with title header
set cmd to "ssh " & lancom & " dir '/Setup/Voice-Call-Manager/Call-Router/Call-Routing/" & fritzbox & "'"
try
do shell script "/usr/bin/su - " & user & " -c " & "'" & cmd & "'" with administrator privileges
on error
display dialog "LANCOM " & lancom & " ist nicht erreichbar"
end try
set output to paragraph 5 of result
set olddestination to replaceText(" ", "", text 196 thru 230 of output as text)
repeat with i from 1 to count phonelist
if item i of phonelist contains selected then
set newdestination to i + 10
end if
end repeat
set cmd to "ssh " & lancom & " set /Setup/Voice-Call-Manager/Call-Router/Call-Routing/" & fritzbox & " \\\"\\\" \\\"\\\" \\\"\\\" \\\"\\\" " & newdestination
try
do shell script "/usr/bin/su - " & user & " -c " & "'" & cmd & "'" with administrator privileges
on error
display dialog "LANCOM ist nicht erreichbar (" & result & ")"
end try
set cmd to "ssh " & lancom & " dir '/Setup/Voice-Call-Manager/Call-Router/Call-Routing/" & fritzbox & "'"
try
do shell script "/usr/bin/su - " & user & " -c " & "'" & cmd & "'" with administrator privileges
on error
display dialog "LANCOM ist nicht erreichbar "
end try
set output to paragraph 5 of result
set destination to replaceText(" ", "", text 196 thru 230 of output as text)
set i to destination - 10
set destinationName to item i of phonelist
if destinationName = "Keine" then
set txt to "Rufumleitung ausgeschaltet"
else
set txt to "Neues Ziel ist " & destinationName
end if
display dialog txt with title header buttons {"OK"} giving up after 10
jetzt funktioniert's.
So etwas als Standard Funktion (z.B. via WEB wäre schön).
set user to "henrihoffmann"
set fritzbox to 20
set lancom to "router.praxis.intra"
set phonelist to {"AB21", "AB22", "AB23", "AB24", "AB24", "Keine"}
set header to "LANCOM Anrufbeantworter "
on replaceText(find, replace, subject)
set prevTIDs to text item delimiters of AppleScript
set text item delimiters of AppleScript to find
set subject to text items of subject
set text item delimiters of AppleScript to replace
set subject to "" & subject
set text item delimiters of AppleScript to prevTIDs
return subject
end replaceText
set selected to choose from list phonelist with prompt "Rufumleitung" with title header
set cmd to "ssh " & lancom & " dir '/Setup/Voice-Call-Manager/Call-Router/Call-Routing/" & fritzbox & "'"
try
do shell script "/usr/bin/su - " & user & " -c " & "'" & cmd & "'" with administrator privileges
on error
display dialog "LANCOM " & lancom & " ist nicht erreichbar"
end try
set output to paragraph 5 of result
set olddestination to replaceText(" ", "", text 196 thru 230 of output as text)
repeat with i from 1 to count phonelist
if item i of phonelist contains selected then
set newdestination to i + 10
end if
end repeat
set cmd to "ssh " & lancom & " set /Setup/Voice-Call-Manager/Call-Router/Call-Routing/" & fritzbox & " \\\"\\\" \\\"\\\" \\\"\\\" \\\"\\\" " & newdestination
try
do shell script "/usr/bin/su - " & user & " -c " & "'" & cmd & "'" with administrator privileges
on error
display dialog "LANCOM ist nicht erreichbar (" & result & ")"
end try
set cmd to "ssh " & lancom & " dir '/Setup/Voice-Call-Manager/Call-Router/Call-Routing/" & fritzbox & "'"
try
do shell script "/usr/bin/su - " & user & " -c " & "'" & cmd & "'" with administrator privileges
on error
display dialog "LANCOM ist nicht erreichbar "
end try
set output to paragraph 5 of result
set destination to replaceText(" ", "", text 196 thru 230 of output as text)
set i to destination - 10
set destinationName to item i of phonelist
if destinationName = "Keine" then
set txt to "Rufumleitung ausgeschaltet"
else
set txt to "Neues Ziel ist " & destinationName
end if
display dialog txt with title header buttons {"OK"} giving up after 10