For SSH use portforwarding and open a New SshClient to the forwarded port.
For everything else (e.g. sudo) use expect und write the password to the stream.
Since you dont want to show some code i cant tell you what you are doing wrong.
And i wont do your work and write the code for you :P
All i can say the lib is capable to do this.
For everything else (e.g. sudo) use expect und write the password to the stream.
Since you dont want to show some code i cant tell you what you are doing wrong.
And i wont do your work and write the code for you :P
All i can say the lib is capable to do this.