enabled sftp private key support (instead of password)

this is the code to make #9182 work
My intuition tells me that "if (!!$foo)" is exactly the same as "if ($foo)". There basically is no use case for !!. And for casting you really should just use proper casting instead.