I'm a newbie in Perl programming.

I have to start/stop the Windows services running on the remote machine. So, I’m writing a script in Perl to accomplish this job.
So far, I’ have completed the following tasks.
• to access the windows services through Perl in my local machine.
• Able to connect to the remote machine (using telnet/socket programming).

The problem here is I’m not able to use the credentials viz. username and password to access the remote machine. Every time, it’s gives session expired even though Timeout is 50/100 seconds.
When I tried to connect to the remote machine using telnet at the DOS prompt, a blank screen will be displayed. It’s connected but, not asking for user name and password.

Can you please tell me how to access the remote machine from a Windows/Linux machine?

Thanks in advance.