in reply to Net::SFTP no terminal

I believe I have narrowed it down to something with the underlying SSH is not connecting properly due to there being no terminal.

Why do you thing so? have you run it with debugging enabled? if so, what output did you get?

AFAIK, the Net::SSH::Perl SSH implementation used by Net::SFTP, in its way, uses "BatchMode" by default.

You can also try using Net::SFTP::Foreign that uses any binary SSH client installed on your machine for the SSH layer.