For my 3D printer watchdog project, I am using Kotlin with IntelliJ. To avoid the hassle of uploading and remote debugging, I use the Embedded Linux JVM Debugger for Raspberry Pi plugin for IntelliJ, which is very straightforward.
On the other side, I use a Raspberry Pi 1 Model B with DietPi installed. DietPi v9.5.1 (Linux 6.1.21+) comes with Dropbear installed as the default SSH server, but this doesn’t work with the plugin. Running an application with that combination results in an IOException (-1).
The reason for that seems to be the missing SFTP service, which, as far as I know, is not available with Dropbear.
However, switching to OpenSSH with SFTP solved that issue.