Sn1per
19-02-2015, 19:34
Salve a tutti. Allora il mio problema è questo: come faccio a far eseguire da un .command locale uno script in remoto invece che sempre da locale?
Esempio .sh locale:
Dato .command in locale
Dato .sh locale
#!/bin/bash#
echo -n -e "\033]0;TEST\007"
{
ssh nome@IP "$(< /Users/Utente/Desktop/TEST.sh)"
}
osascript -e 'tell application "Terminal" to quit' &
exit
Così funziona da locale. Ma se il file .sh fosse ad un URL? Come posso fare? Così non funziona:
Dato .command in locale
Dato .sh ad URL http://TEST.sh
#!/bin/bash#
echo -n -e "\033]0;TEST\007"
{
ssh nome@IP "$(< http://TEST.sh)"
}
osascript -e 'tell application "Terminal" to quit' &
exit
Ci sarebbe poi un'ultima domanda: si può evitare di dover mettere la password ogni volta ed inserirla nel .command?
Esempio .sh locale:
Dato .command in locale
Dato .sh locale
#!/bin/bash#
echo -n -e "\033]0;TEST\007"
{
ssh nome@IP "$(< /Users/Utente/Desktop/TEST.sh)"
}
osascript -e 'tell application "Terminal" to quit' &
exit
Così funziona da locale. Ma se il file .sh fosse ad un URL? Come posso fare? Così non funziona:
Dato .command in locale
Dato .sh ad URL http://TEST.sh
#!/bin/bash#
echo -n -e "\033]0;TEST\007"
{
ssh nome@IP "$(< http://TEST.sh)"
}
osascript -e 'tell application "Terminal" to quit' &
exit
Ci sarebbe poi un'ultima domanda: si può evitare di dover mettere la password ogni volta ed inserirla nel .command?