[LUNI] ssh scripting (Can only use passwords) Help please..
Brett Rilling
selfism at hotmail.com
Sun Apr 11 13:37:42 CDT 2004
Thanks in advance!!!
#!/bin/bash
#My script works with telnet but not ssh. How can I make it work with ssh
using a method similar to this?
# WORKS GREAT WITH TELNET...
( sleep 5; echo mux; sleep 5; echo mypassword; sleep 5; echo w ) | telnet
10.10.10.10
# BUT NOT WITH SSH...
set -x
( sleep 5; echo mypassword; sleep 5; echo w ) | ssh mux at 10.10.10.10
[root at station6 router]# ./test
+ sleep 5
+ ssh mux at 10.10.10.10
Pseudo-terminal will not be allocated because stdin is not a terminal.
mux at 10.10.10.10's password: + echo mypassword
+ sleep 5
+ echo w
+ sleep 5
Connection closed by 10.10.10.10
_________________________________________________________________
MSN Toolbar provides one-click access to Hotmail from any Web page FREE
download! http://toolbar.msn.com/go/onm00200413ave/direct/01/
More information about the luni
mailing list