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

ProxyJump doesn't work when jump server has underscore in name #2008

Open
3 tasks done
brishav23 opened this issue May 8, 2024 · 3 comments
Open
3 tasks done

ProxyJump doesn't work when jump server has underscore in name #2008

brishav23 opened this issue May 8, 2024 · 3 comments
Labels
bug Bug that's either related to Blink Shell or prevents the user to use the app in normal conditions.

Comments

@brishav23
Copy link

brishav23 commented May 8, 2024

Checklist

Configuration

Blink version: 17.2.2.868
iOS: 17.4.1
iPhone 13 Pro

Blink version: 17.3.0.895
iPadOS: 17.4.1
iPad Pro 11-inch (3rd gen, M1)

Describe the bug

When I try to use a host that has an underscore in its name to proxy jump, I get an error message.
I managed to replicate this on my iPhone using the latest app store version and my iPad with the TestFlight version.

For example, with the following configuration:

Alias: host_jump
HostName: ...
Port: ...
User: ...
Alias: host
HostName: ...
Port: ...
User: ...
ProxyJump: host_jump

attempting to ssh host gives me the error message:

Error connecting to testvm. operationError(msg: "Failed to set option \'SSH_OPTIONS_PROXYJUMP\'")

However, if I change this to

Alias: hostjump
HostName: ...
Port: ...
User: ...
Alias: host
HostName: ...
Port: ...
User: ...
ProxyJump: hostjump

then I can connect as expected.

For what it's worth, if I use ProxyCommand instead like so:

Alias: host_jump
HostName: ...
Port: ...
User: ...
Alias: host
HostName: ...
Port: ...
User: ...
ProxyCommand: ssh -W %h:%p host_jump

then ssh host works just fine as well.

@brishav23 brishav23 added the bug Bug that's either related to Blink Shell or prevents the user to use the app in normal conditions. label May 8, 2024
@carloscabanero
Copy link
Member

I need to check this but we can get it fixed before final release for 17.3.0

@carloscabanero
Copy link
Member

carloscabanero commented Jun 7, 2024

So here is the thing. Although underscores are allowed in domain names, they are still not allowed in Host Names. Host names are limited to letters-digits-hyphens. Libssh follows this convention, I'm not sure if OpenSSH does though. When we are the ones replacing it (on the ProxyCommand example you sent), this is not an issue as we consider that an "Alias" and not a Hostname.

That being said, one thing is what the rules say and another what people are actually doing. We may need to take this to upstream. For the time being, if you want to have underscores, just don't use them at the ProxyJump itself.

I'm gonna leave this for a later release because I don't know if the "underscore" may actually break other things within LibSSH for 17.3.0 and we are about to release. If the issues had been parsing on our side, I would have had no problem making the change. Hope that makes sense.

Resources
https://git.libssh.org/projects/libssh.git/tree/src/misc.c#n2133
https://stackoverflow.com/questions/2180465/can-domain-name-subdomains-have-an-underscore-in-it/2183140#2183140

@brishav23
Copy link
Author

I see, that makes sense. Thanks for checking that out; it doesn't really affect the usefulness of the app anyway 😆 as for OpenSSH, the reason I opened the issue was because the same config (with underscores for the ProxyJump) worked fine on my Mac with OpenSSH, but I didn't realize that might have been an OpenSSH-specific thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that's either related to Blink Shell or prevents the user to use the app in normal conditions.
Projects
None yet
Development

No branches or pull requests

2 participants