Code Monkey home page Code Monkey logo

async-ssh2-tokio's People

Contributors

avgrocks avatar banyc avatar blankll avatar chanderlud avatar cheban1996 avatar cybersoulk avatar czadamv avatar matthiasbeyer avatar miyoshi-ryota avatar mtsbucy1 avatar mwileczka avatar packetsource avatar qpalzmqaz123 avatar rukai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

async-ssh2-tokio's Issues

Please add derives

Could you please add derives to

/async-ssh2-tokio/tree/main/src/client.rs line 100:
pub struct Client {

Not working with domain names (at least on macOs)

ServerCheckMethod::DefaultKnownHostsFile or ServerCheckMethod::KnownHostsFile(...) Fail

error: "Err(Unknown server key)"

my known_hosts has the domain name listed.
async-ssh2-tokio seems to convert my domain to an IP and passes it to russh, where it will try to match it against the domain in known_hosts, and that fails

Bind a Client to Specific Interface

I have a use case that requires binding a client to a specific network interface, for example something like this:

ssh -B eth1 fe80::9656:d028:8652:66b6

I believe I cannot use IP routing tables to handle this as it is specifically a link local IPv6 address. I believe tokio provides support for this (https://docs.rs/tokio/1.32.0/tokio/net/struct.TcpSocket.html#method.bind_device) but I do not believe that this library, or potentially even russh itself, support this?

Happy to make a corresponding issue over at russh as well if that makes more sense!

Allow running multiple commands

Currently, one has to reconnect (i.e. call Client::connect) before every invocation of Client::execute.
I believe it would be preferable to fix this, so that one can call execute as often as needed.

Internally I see no reason for this not to be implemented, my fix delays the call to channel_open_session until the beginning of the execute method. See mTsBucy1@d51e5e1

A even more elegant fix would be to connect in the constructor of the client. Then the type system ensures that when there exists a Client, it is (or at least once was) connected and authenticated. I, again, see no reason for having an unconnected Client instance.

My fork also addressed some other ergonomic, but breaking, changes. Thus a simple PR will not suffice. I believe my changes are improvements, but I'm open to any discussion if that gets those changes merged (in a new incompatible 0.4.0 version).

Lastly, what's your status on this project, should I try to help with the development of this crate, or have you abandoned it and should I rather work on my fork?

Executing git clone on windows with a ssh repository url fails

Running git clone on a remote windows machine with a ssh repository url fails.
I've figured out that this is somehow due to a missing tty and it can be fixed by calling Channel::request_pty(true, "vt100", 80, 24, 640, 480, &[(russh::Pty::TTY_OP_END, 0)][..]) after opening a session.

Since this is most often not wanted, this would need to be behind an option or the tty may need to be created by other methods, but I have very little knowledge in this area (is agetty related?).

Does anyone know more?

Add support for SCP

I would like a simple function to download a file from the remote host, e.g. using scp.

I will probably implement this myself, it shouldn't be too difficult.

Tunneling

Hi! I am wondering if I can use this library to model the ssh command: ssh -N -p 2222 -L6116:<target-host>:5432 tunnel@localhost

Working with shells

I am curious if it is possible to interact with a shell using this lib. Basically send something, then wait for the prompt, send something, wait for the prompt.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.