I have used Net::SSH::Expect to perform this task with both key-based and password authentication.
Any expect-capable script should resolve any of your timing concerns.
In reply to Re^2: send su password in ssh
by steve
in thread send su password in ssh
by tmhossain
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |