SSH on a remote machine with password.
I have an issue. It would be great if anyone could help; I need to SSH to a remote machine and execute a specific command there and capture its output.
As per the standard stuff, i should be able use the following syntax for SSH:
ssh username IP <command>
and use expect to supply the password.
But my remote machine is not a STANDARD unix machine and hence i can not execute the command like this in one step.
I need to SSH to this server and then execute the command as a second step. I am new to EXPECT. Please suggest.
Please note that SSH-KEYGEN does not also work with my remote machine.
It would be really nice if somebody could share a simple expect script for the above requirement.
Thanks in advance