Simplify doSSH()
This commit is contained in:
parent
bae5cc903c
commit
01173b6fd1
@ -77,18 +77,10 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||||||
22,
|
22,
|
||||||
timeout: const Duration(seconds: 0, milliseconds: 500),
|
timeout: const Duration(seconds: 0, milliseconds: 500),
|
||||||
);
|
);
|
||||||
} on SocketException {
|
|
||||||
setState(() {
|
|
||||||
_output = "SocketException: Could not connect to the server.";
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
final client = SSHClient(
|
final client = SSHClient(
|
||||||
socket,
|
socket,
|
||||||
username: 'test',
|
username: 'test',
|
||||||
//onPasswordRequest: () => '123456',
|
|
||||||
identities: List.of(keyPair != null ? [keyPair!] : []),
|
identities: List.of(keyPair != null ? [keyPair!] : []),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user