Also, it is not checking the remote host key. That spoils the security of the SSH protocol.
In reply to Re^2: instantiating an SFTP object by salva in thread instantiating an SFTP object by Aldebaran