Hexaware Technologies Interview Question

How do you automate the telnet login?