in reply to Perl Cookie Encryption

maybe a good idea is to use two usernames and two passwords.
the first username and password pair will be used to encrypt the cookie data (btw. you can't encrypt to whole cookie itself but you can encrypt the data that the gets filled with). This username, passwor pair will never be stored on the client; maybe you can put in a session object on the http-server-side as long as the user is logged in.
then u use Crypt::TripleDES to encrypt and decrypt that data used to access the telnet/ssh server. (you can build a key for encryption like this "$username$password")

but keep in mind, that this is not really secure but probably the highest security level you can get for your problem and still being easy to implement.