The qemu is using libssh2 at this moment. Switching to libssh is blocked on performance issues. Simple test transferring 128 MB allocates almost 10x times more data and roughly around 2x more memory than libssh2.
libssh: ==23832== HEAP SUMMARY: ==23832== in use at exit: 127,621 bytes in 854 blocks ==23832== total heap usage: 389,345 allocs, 388,491 frees, 1,368,567,364 bytes allocated
==23432== HEAP SUMMARY: ==23432== in use at exit: 127,957 bytes in 856 blocks ==23432== total heap usage: 152,729 allocs, 151,873 frees, 550,742,657 bytes allocated