in reply to Re: Net::SFTP 'invalid packet header'in thread Net::SFTP 'invalid packet header'
Use scp and ssh keys. That's exactly what they're for.