<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def connect_with_key(self, ssh, username, key, address, port, sock, timeout=20):
 """ Create an ssh session to a remote host with a username and rsa key :type username: str :param username: username used for ssh authentication :type key: :py:class:`paramiko.key.RSAKey` :param key: paramiko rsa key used for ssh authentication :type address: str :param address: remote server address :type port: int :param port: remote server port """

        ssh.connect(hostname=address,
                    port=port,
                    username=username,
                    pkey=key,
                    sock=sock,
                    timeout=timeout)