I need to upload a small file to the root folder of my web site, but it isn't working using CURLSMBS. I was using the FTPKit module without any problems, but that is obsolete now in 64-bit Catalina. I'm running Xojo 2019 R2.1.
I need to use a username and password to authenticate the upload within my app.
I am running the MBS "CURLS ftp file upload" example project:
dim e as integer dim f as folderitem dim d as UploadCURL 'This is subclassed from CURLSMBS, it just implements FileComplete, LoggedIn, and LoginFailed events. f=SpecialFolder.Desktop.child("TestFileToUpload") b = BinaryStream.Open(f) d=New UploadCURL d.stream = b d.OptionURL = "sftp://mckernon.com" d.OptionUpload = True d.OptionSSHAuthTypes = 2 '****Force using a password**** d.OptionVerbose = True 'generate messages d.CollectDebugData = True 'collect them d.OptionInFileSize = b.Length d.OptionUsername = "myusername" d.OptionPassword = "mypassword" e = d.Perform
If I leave the example project "as is", without the "d.OptionSSHAuthTypes=2. '****Force using a password****" line, then the web site defaults to SSH public key authentication, which fails.
With the d.OptionSSHAuthTypes=2, then I get a "permission denied (3-31) message". I use Transmit to upload files to my web site all the time with the same username and password, so I'm baffled.
These are the messages returned during the connection:
Connected to mckernon.com (184.108.40.206) port 22 (#0)
SSH MD5 fingerprint: 00b6ad7cb7f54a20293cc0834d0a6b4c
SSH authentication methods available: publickey,password,keyboard-interactive
*With* d.OptionSSHAuthTypes=2, it returns:
Initialized password authentication
Upload failed: Permission denied (3/-31)
*Without* d.OptionSSHAuthTypes=2, it returns:
Using SSH private key file ‘'
SSH public key authentication failed: Unable to extract public key from private key file: Unable to open private key file
I assume I'm missing something obvious, can anyone suggest what?