Simplify doSSH()

This commit is contained in:
lemoer 2025-06-20 11:26:57 +02:00
parent bae5cc903c
commit 01173b6fd1

View File

@ -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!] : []),
); );