Fix sftp-test failures for recent builds

After digging around for some time, found the fix for the test to pass.
Very likely this is due to ssh2 upgrad.