method OpenSFTP(ByRef sftp As %Net.SSH.SFTP) as %Status

Open up an SFTP session for SFTP activity.

 ByRef this means that the variable you pass has to be initialized first.

#dim sftp As %Net.SSH.SFTP 

 just binds the object type to variable  sftp but doesn't initialize it.
So it is <UNDEFINED>

Use your  original line instead or in addition to initalize it

Set sftp ##class(%Net.SSH.Session).%New()

I had to transfer more than a few files. so I shared a docker  volume:

docker run  ...... --name=iris1 -d -v volume1:/external   ........
docker run ....... --name=iris2 -d -v volume1:/external   ........

so both containers  have permanent access and can pass files as we use to pass Globals using IRISTEMP  or CACHETEMP

The volume gets generated at first access automatically

@Luca Ravazzolo , @Jose-Tomas Salvador 

I succeeded to force an upgrade of my Win 10 to  2004 and to activate WSL2   (installation blocked until VMware was de-installed !)
and Docker Desktop For WSL2.
Quite interesting to have a Windows-Installer for a Linux program. Take care to use version >2.3.0 2  for WSL2
And it was running as expected with no troubles. No issues with Images, Containers, Volumes, Networks.

It's an interesting experience, especially as I'm not forced to use PowerShell.
Communication with Win File System goes Docker ==> WSL2 ==> Windows.
Next positive surprise: my local C:\..  was mounted byWSL2 to /mnt/c/....  (I just tried read access)

Bad surprises:
- the guide to install / activate was  just of limited help, partially confusing / contradictionary   
Google helped with useful and just commercial advice.
- Reboots: after #5 I stopped counting 

Still a challenge: I couldn't find out where WSL2 file system was homed on my C:\ drive.
 

This is the CLASSIC way of prototyping and fast data /  bug fixing for over 40 years !!
And I know my customers well. It's their style.
Especially if you don't have fast connections to your server.
As Caché / IRIS still don't support SSH and just TELNET
WebTerminal over HTTPS could have been a secure access with similar functionality.

BTW.  did you mean having an IDE and WebTermial  open in parallel ?

@Nikita Savchenko