total noobian here: trying to right an expect script to log-in to a router with ssh and retrieve some stats to a log file, however i seem to loose the output passed the password stage.
I relaise there is a fair ammount online regarding this, and apologies for covering old ground, but i seem to be totally failing to get my head around it thus i was hoping someone could spell it out.
Here is the code i am using so far:
spawn ssh -p1022 SUPERUSER@x.x.x.x
expect "SUPERUSER@192.168.128.2'2 password:"
and the output i get is:
spawn ssh -p 1022 SUPERUSER@x.x.x.x
I have experimented with expect_out and exp_send to no avail.
Any help would be great.
Thanks in advance.