Look at http://www.stunnel.org/ . Set up an a forwarding stunnel on your
machine to connect to a listening stunnel on the remote machine.
All ports work basically the same way so consult the examples section on
the site for details. The basic mechanism works as follows (both client
and server have stunnel running on them though configured differently) :
(Server is 192.168.0.10)
Tunnel
127.0.0.1:23->192.168.0.10:1000 ----------->
192.168.0.10:1000->127.0.0.1:23
Accepts traffic listening on localhost port 23, encrypts it and forwards
it to remote host port 1000.
Remote host listens on port 1000, decrypts traffic and forwards it to
locahost port 23.
I use perl for this by having it generate a .conf which gets passed to
stunnel as a parameter (establishing the tunnel). I also have it handle
dismantling the tunnel when I am done. I don't have time to be more
descriptive but everything you need to be able to do this is at
www.stunnel.org
-M
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, May 19, 2008 10:27 AM
To: [EMAIL PROTECTED]
Cc: [email protected]
Subject: RE: How Can I use ssh in my perl code
Hi Matt,
Thanks a lot for your kind suggestion, but it is my requirement so I
don't have any choice here.
I request you to guide me how can I achieve this. And if possible please
send me a code example.
It will be a great help for me, if you send some link as well.
Thanks,
Mustafa
-----Original Message-----
From: Matthew Joyce [mailto:[EMAIL PROTECTED]
Sent: Monday, May 19, 2008 6:48 PM
To: Mohammed Mustafa (WT01 - Testing Services)
Cc: [email protected]
Subject: Re: How Can I use ssh in my perl code
I suggest not using net::ssh. It is slower than molasses.
System calls? Not very secure... but it would work...
I would say perl is probably the wrong tool for this job. But that's
just my opinion.
-Matt
On May 19, 2008, at 9:12 AM, <[EMAIL PROTECTED]> wrote:
> Hi Dear Friends,
>
> I want to connect to remote m/c through ssh to do the testing
> at remote m/c, which we can do with ssh ( but I have not done).
> And my question is, How can we interface the ssh to our perl script so
> that our perl will take care of all things, like
> 1) connecting to remote m/c once we execute the perl script through
> ssh.
> 2) How to run the application at remote side.
>
> And if you have code example, please send me across.
>
> Hope I am clear here, if not please tell me.
>
> Regards,
> Mustafa
>
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any
> attachments to this message are intended for the exclusive use of the
> addressee(s) and may contain proprietary, confidential or privileged
> information. If you are not the intended recipient, you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately and destroy all copies of this message and any
> attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of
> viruses. The company accepts no liability for any damage caused by any
> virus transmitted by this email.
>
> www.wipro.com
This e-mail is intended only for the named person or entity to which it
is addressed and contains valuable business information that is
proprietary, privileged, confidential and/or otherwise protected from
disclosure.
If you received this e-mail in error, any review, use, dissemination,
distribution or copying of this e-mail is strictly prohibited. Please
notify us immediately of the error via e-mail to
[EMAIL PROTECTED] and please delete the e-mail from your system,
retaining no copies in any media. We appreciate your cooperation.
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.
www.wipro.com