[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dubte: ssh a un script per a copiar



* [02/07/04 12:23] Rafel Puchades:

> no se com passar-li el password als arguments
> i si li l'intente passar redirigint un arxiu de text com a stdin no me 
> l'agafa

NO HO FACIS AIXÍ... però com a curiositat:

ernest@tty3:~ $ usr_pass() { sleep 2; echo "ernest"; sleep 2; echo "blablah"; sleep 2; echo "exit"; }
ernest@tty3:~ $ usr_pass
ernest
blablah
exit
ernest@tty3:~ $ usr_pass | telnet localhost
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Debian GNU/Linux Sarge doriath.local
doriath login: ernest
Password:
Last login: Fri Jul  2 17:22:26 2004 from localhost on pts/3

You have mail.
ernest@doriath:~$ Connection closed by foreign host.


Amb ssh no ho he provat però en "teoria" hauria de ser igual.

-- 
ernest

      "Talking about music is like dancing about architecture."
                               -- Laurie Anderson



Reply to: