Comments (2)
I'm running the code as a Windows app, and I have the dartssh2 2.9.1-pre
package.
from dartssh2.
A summarized version of the relevant code would be this.
var _socket = await SSHSocket.connect(TARGET_IP, 22);
var _client = SSHClient(_socket,
username: SSH_USER,
onPasswordRequest: () => SSH_PASSWORD);
await _client.authenticated;
var _serverSocket = await ServerSocket.bind(LOCALHOST, 0);
print('Listening on ${_serverSocket.address.address}:${_serverSocket.port}');
await for (final socket in _serverSocket) {
final forward = await _client!.forwardLocal("locahost", 5900,
localHost: LOCALHOST, localPort: _serverSocket.port);
forward.stream.cast<List<int>>().pipe(socket);
socket.cast<List<int>>().pipe(forward.sink);
}
from dartssh2.
Related Issues (20)
- await file.write(File('local_file.txt').openRead().cast()).done; This code execution will block HOT 1
- Generate SSH keys similar to ssh-keygen
- Proposed change in code for the "|" operator overload in SftpFileOpenMode
- sftp upload create a 0 byte file and holding HOT 1
- How can I add UDPGW port?
- SSHAuthAbortError(Connection closed before authentication) when using jumpServer HOT 3
- [Flutter] Keep waiting for the https api response in local port forwarding for large response data
- Shell without Streams
- bug: Unhandled Exception: SSHStateError(Transport is closed) HOT 2
- Slow SFTP on phone
- Web Problem HOT 2
- Web Failed to establish SSH connection: UnimplementedError: Native socket is not supported on web HOT 1
- stderr emit for client.run()
- SSHAuthFailError(All authentication methods failed) HOT 2
- FormatException: Unexpected extension byte" Error with Non-UTF-8 File Names
- Operation not permitted when running on macos HOT 1
- SSH Connection not working in release build (apk installed on phone), but working on simulated phone in android studio. HOT 2
- Does this project have an active maintainer? HOT 1
- Is there an easy way to get the exitCode when use SSHClient.run()?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dartssh2.