Timer(const Duration(seconds: 30), () async {
print("timer triggered");
if (_sshClient == null) {
_sshClient = new SSHClient(
host: _strumAddress,
port: 22,
username: "****",
passwordOrKey: "******",
);
}
try {
String result = await _sshClient.connect();
if (result == "session_connected") {
print("ssh connected");
var result;
result = await _sshClient.connectSFTP();
}
} on PlatformException catch (e) {
print('Error: ${e.code}\nError Message: ${e.message}');
_sshClient.disconnect();
_sshClient = null;
}
});
I only tested on Android, and I'm sure that the server is running, and that credentials are correct (I can connect from Windows using pscp.exe and OpenSSH 'spc' command).
Is there any hint you can give me? Some way to have a verbose output that may share some light on this?
Thanks in advance
Hello,
I'm trying to connect to a device from my own Flutter app, but when I try to connect to SFTP I get the following error:
This is my code:
I only tested on Android, and I'm sure that the server is running, and that credentials are correct (I can connect from Windows using pscp.exe and OpenSSH 'spc' command). Is there any hint you can give me? Some way to have a verbose output that may share some light on this? Thanks in advance