SFTP: login() must be called after getServerPublicHostKey().

@PVince81 @LukasReschke 

Tested "nothing breaks" on master
Needs backport to stable7
Needs backport to stable6 (and testing)