ssh2 doesn't work for ipv6 host address
I was trying to connect to a ipv6 address from my host. It failed with error: ERROR: connect EINVAL
Do you have a network interface with a valid IPv6 address?
Also, if you pass the IPv6 address string to require('net').isIP() in a repl, what is the result?
yeah it does have a valid network interface with valid ipv6 address, the ipv6 referred here is the host i m trying to connect to I also tried address%eth0 as the host string but didn't work.
On Sat, Oct 29, 2016 at 4:06 PM, Brian White [email protected] wrote:
Also, if you pass the IPv6 address string to require('net').isIP() in a repl, what is the result?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mscdex/ssh2/issues/487#issuecomment-257084201, or mute the thread https://github.com/notifications/unsubscribe-auth/AE3NezSHtsxpwSTXgQEBVVevygJG7cYnks5q4yHCgaJpZM4KkE2s .
What result do you get when calling isIP() on the address?
returns 6 . Is this library tested for ipv6 as well?
On Sat, Oct 29, 2016 at 10:58 PM, Brian White [email protected] wrote:
What result do you get when calling isIP() on the address?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mscdex/ssh2/issues/487#issuecomment-257104385, or mute the thread https://github.com/notifications/unsubscribe-auth/AE3Ne_HbdqhFNlPzMxG5O7qZ_HvGy1C5ks5q44I1gaJpZM4KkE2s .
IPv6 support should be transparent, so there should be no reason to test it specifically.
What version of node is this?
Does connecting to the IPv6 address with the OpenSSH client work?
yeah connecting via open ssh works
On Sun, Oct 30, 2016 at 10:22 PM, Brian White [email protected] wrote:
It should be transparent.
What version of node is this?
Does connecting to the IPv6 address with the OpenSSH client work?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mscdex/ssh2/issues/487#issuecomment-257162757, or mute the thread https://github.com/notifications/unsubscribe-auth/AE3NezVZsObjUwnxMpUVtzXy89feS9GWks5q5MtKgaJpZM4KkE2s .
Node.js version?
node verison is : 6.7.0
On Sun, Oct 30, 2016 at 11:15 PM, Brian White [email protected] wrote:
Node.js version?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mscdex/ssh2/issues/487#issuecomment-257166019, or mute the thread https://github.com/notifications/unsubscribe-auth/AE3Ne5lPqqePGc2TOH4xdqNLhliZ9sxoks5q5NfUgaJpZM4KkE2s .
Is the IPv6 address you're trying to connect to a link-local address (starts with fe80::)?
correct its a link local address
On Mon, Oct 31, 2016 at 12:01 AM, Brian White [email protected] wrote:
Is the IPv6 address you're trying to connect to a link-local address (starts with fe80::)?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mscdex/ssh2/issues/487#issuecomment-257169073, or mute the thread https://github.com/notifications/unsubscribe-auth/AE3Ne1P-QLxp0pFOnOu0zzHkXtoJhuEvks5q5OJygaJpZM4KkE2s .
For link-local addresses you will probably need to append the interface name, like: fe80::2acf:daff:fedd:342a%eth0
tried that too, reports same error
On Mon, Oct 31, 2016 at 12:17 AM, Brian White [email protected] wrote:
For link-local addresses you will probably need to append the interface name, like: fe80::2acf:daff:fedd:342a%eth0
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mscdex/ssh2/issues/487#issuecomment-257170046, or mute the thread https://github.com/notifications/unsubscribe-auth/AE3NezuGl29vZqYFx5boa7IjG3LxsDYEks5q5OZJgaJpZM4KkE2s .
is it tested for ipv6 as well?
On Mon, Oct 31, 2016 at 12:40 AM, Diljit Pr [email protected] wrote:
tried that too, reports same error
On Mon, Oct 31, 2016 at 12:17 AM, Brian White [email protected] wrote:
For link-local addresses you will probably need to append the interface name, like: fe80::2acf:daff:fedd:342a%eth0
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mscdex/ssh2/issues/487#issuecomment-257170046, or mute the thread https://github.com/notifications/unsubscribe-auth/AE3NezuGl29vZqYFx5boa7IjG3LxsDYEks5q5OZJgaJpZM4KkE2s .
As previously stated there are no explicit IPv6 tests because node handles that, not ssh2.
FWIW I just tried this locally and it worked for me when I appended to the end of the link-local IPv6 address a % followed by the network interface name (eno1 in my case) the connection should be routed through.
did you pass this string (ipv6%interface)as a hostname?
On Mon, Oct 31, 2016 at 12:58 AM, Brian White [email protected] wrote:
As previously stated there are no explicit IPv6 tests because node handles that, not ssh2.
FWIW I just tried this locally and it worked for me when I appended a % and then the network interface name the connection should be routed through to the end of the IPv6 address.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mscdex/ssh2/issues/487#issuecomment-257172802, or mute the thread https://github.com/notifications/unsubscribe-auth/AE3Ne1Hx7Sq_OAUtwJOb9DdE5OQRZc1mks5q5O_TgaJpZM4KkE2s .
Yes, like the example link-local address I mentioned earlier. Your network interface name may be different though.
could you paste the code snipped you used just now?
There is nothing special about the code, you can use any of the examples in the readme. The only change from those examples is the host config value, which is the IPv6 address followed by % and the network interface name the connection should go through.
If adding that extra part after the IPv6 address does not work for you, and you are sure you have the correct network interface name, then you might need to post an issue to the node.js issue tracker.