enabled sftp private key support (instead of password)

this is the code to make #9182 work
It might be safer to use `empty($this->keyfile)`. Sometimes PHP tries to be clever and might behave strangely if the keyfile is called "0" or "false".