Miyoshi-Ryota / async-ssh2-tokio

asynchronous and easy-to-use high level ssh client library for rust
Apache License 2.0
71 stars 27 forks source link

Bind a Client to Specific Interface #51

Open iwoloschin opened 11 months ago

iwoloschin commented 11 months ago

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!

Miyoshi-Ryota commented 11 months ago

@iwoloschin Sorry for the late reply. I will give you a formal reply later. The formal reply will probably be in another week.

(I've been busy the last two weeks, too hard a life for open source activities).

As soon as I got your message, I thought it might have been a routing issue even if it was link local. However, since I haven't done any research, it is quite possible that I am wrong and you are right. I will research it later and give you a formal response.