When you connect (via ssh or telnet) to a remote machine, you need to > type (manually) > your username and your password. Programming that is never easy. I have setup the public keys to AUTO LOGIN so that it doesn't ask the password.