[PAID] SFTPClient: An extension to use SSHv2 [$6 or INR 350]

1.Introduction

Description: An extension to use SSHv2 with JSch
Latest Version: 1.1
Released: 2021-02-28T18:30:00Z
Last Updated: 2024-02-26T18:30:00Z
Permissions: android.permission.INTERNET,android.permission.READ_EXTERNAL_STORAGE,android.permission.WRITE_EXTERNAL_STORAGE

2.Blocks

image

3.Documentation

Events

GotOutputEvent raised after getting response from Shell
exitStatus | number
outputResponse | text
errorResponse | text
GotErrorEvent invoked when any error occurs
errorMessage | text
ConnectedEvent indicating that connection to FTP server was successful and you are now logged in
DisconnectedEvent indicating that you are now logged out and disconnected from server
OnDownloadProgressEvent raised when downloading progress changes
progress | number
OnUploadProgressEvent raised when uploading progress changes
progress | number
GotUploadResultEvent invoked after getting previous upload result
success | boolean
response | text
GotDownloadResultEvent invoked after getting previous download result
success | boolean
response | text
AfterChangeWorkingDirectoryEvent invoked after 'ChangeWorkingDirectory' method with result and new working dir
success | boolean
newWorkingDir | text
GotFileListEvent invoked after getting file list from server
fileNames | list
GotDirListEvent invoked after getting dir list from server
dirNames | list
AfterDeleteEvent raised after 'Delete' method with result
success | boolean

Methods

RunCommandExecutes given command in SSH Shell
command | text
ConnectTries to connect and login to the SFTP server using provided username and password
host | text
username | text
password | text
port | number
strictHostCheck | boolean
DisconnectTries to close the connection to the SFTP server
HomeDirReturns Home path
CurrentWorkingDirReturns current working directory
IsConnectedReturns whether connection is open or not
ChangeWorkingDirectoryChanges current working dir and raises 'AfterChangeWorkingDirectory' event with result
toDir | text
UploadFileUploads file on the server from given file path
Use absolute file path
localFileName | text
remoteFileName | text
DownloadFileDownloads file from server to given file path
Use absolute file path
remoteFileName | text
localFileName | text
ListFilesTries to get files list
dir | text
ListDirsTries to get dir list
dir | text
CreateDirCreates a new dir on server
remoteDirName | text
DeleteTries to delete given dir/file from the server
remotePath | text
isFile | boolean

Properties

4. Purchase Extension

Extension's Price: $6 or INR 350

I am thankful to @TIMAI2 Sir for beta testing the extension. :heart_eyes:
Hope it helps!

8 Likes

Hi good morning. How do I buy this extension?

2 Likes

Just p.m @vknow360

1 Like

Does that work with Android 12, where I have the impression that file access on the phone itself is more difficult. I am reading this thread here: Reading Files from Internal Storage

Files stored in ASD are always accessible to your app, but I am not sure about files stored in primary external (Phone Memory) storage.
Shared media files are accessible till Android 11, but probably Google has limited this in Android 12.

@Alec_Thom

SFTP is SSH File Transfer Protocol.

See below :

3 Likes

Is it working on android 13?

Yes, it is.
Only file uploading/downloading feature is bounded to Android version.
As of Android 11 and above versions you don't have access to complete storage. For more information please read this.

2 Likes

ChangeLog Version 1.1

  • Updated library
  • Added New Blocks
    image

If I purchase the extension today, how soon will it be available for download? Do you have the extension for testing?

Within 5 minutes, if you pm me your email address.

Have a problem with reading console, cant get any response back, like i use cd /adm and then ls, and i don't get back anything, i need to use custom comands on server that i m connecting to and i also get back error massage: bash: : comand not found
When if i connect throu putty for example i can normally use that command
Can anyone help?

Unless @vknow360 knows different, this extension is an sftp client, it does not provide access to run commands in bash.

You could also use a ssh extension for that.[/s]

If it is your server, you could also set up bash scripts to be called by php. been a while since I did it, but could find an example if needed.

Show your blocks.

It does actually. This feature was added in v1.1

I stand corrected :slight_smile:

Got code here, it gets login from first screen then connects with that username and password
When it connects it does change directory (i got bash no command) i thouth that it was becouse it wasn't in proper folder, didnt help


Then i tried to use custom command pon.customer_report 3954

in Putty throu that command i get
image
(red boxes for blocking sesitive data)

Tried, it didn't do sh*** it worked, at least that what debugging text said, but didn,t got response and couldn't read any data (same problem as here)

Just tested sftpClient extn against my linux server, no issues with connection or response, running a variety of bash commands.

What is this pon.customer_report 3954 ?

pon.customer_report is custom command to check status of FTTH ONU of a customer in fiber network, it uses php to get data as shown on second screen.
Do you use mit ai companion or compile your program?

command ? bash script ?

Try ./ in front ?

I tested with companion.