lavf/libssh: factorize create_sftp_session function