My main intension is to connect to remote system using ssh protocol by a normal user and switch to a previlaged user and execute commands.I would consider doing this with SSH keys. You can set things up so that userA on hostA can login (without presenting a password) into hostB as userB and run a restricted set of commands. If you are embedding passwords in remote scripts, then I definitely would look at what SSH keys could do for you.
Here is a link describing how to limit commands that can be run via ssh: The Authprogs SSH Command Authenticator.
In reply to Re: Integrating shell and perl
by pc88mxer
in thread Integrating shell and perl
by srinivas_rocks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |