Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SftpClient, ability to set ClientIpAddress #132

Open
itssimple opened this issue Dec 15, 2016 · 3 comments
Open

SftpClient, ability to set ClientIpAddress #132

itssimple opened this issue Dec 15, 2016 · 3 comments
Assignees

Comments

@itssimple
Copy link

If you use the SftpClient on for example a webserver with multiple IP addresses, we need to be able to set which IP-address to connect from.

var ftp = new SftpClient(new ConnectionInfo(and, so, on, and_on));
ftp.ClientIpAddress = "external_ip_address_here";
ftp.Connect();

This would help us connect to SFTP-servers with limited IP-access.

olegkap added a commit that referenced this issue Dec 20, 2016
@olegkap
Copy link
Contributor

olegkap commented Dec 20, 2016

I added new ConnectionInfo constractor where you can specify client IP to be used in case of multiple IP address.

You can use it like this:
new ConnectionInfo(host, username, password, clientIP)

where clientIP is IPAddress type.

Please get latest version and see if it works for you.

Thanks,
Oleg

@olegkap olegkap self-assigned this Dec 20, 2016
drieseng added a commit that referenced this issue Dec 31, 2016
…ould be used for connection (#132)"

This reverts commit 78679a3.
@drieseng
Copy link
Member

I had to revert this change as it introduced regressions, and I'm pretty sure it did not provide the requested behavior.

@itssimple Can you test and provide feedback once I commit a proposal?

@Metze2000
Copy link

Is there a solution in sight? The change of Dec 2016 seems to be solving the problem, only using host[0].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants