use pipe to redirect the telnet/ssh input/output to internal tasks