telnet and ssh operate and different levels. telnet is a client for interacting with various daemons and it typically very low level; for example, it is useful for talking directly with things like an http or mail server. You are basically participating in the protocol exchange directly.
ssh on the other hand, is a client to sshd; this provides a secure access to the userland shell of the system you're logging into (among other things); for example, you can telnet over an ssh tunnel (which it sounds like what you might need to do in order to retain your functionality).
See A little demo for Net::SSH2 for a Net::SSH2 demonstration. For some perspective on the differences between telnet and ssh, check out http://unix.stackexchange.com/questions/80028/what-is-the-equivalent-of-telnet-localhost-25-with-ssh.