Blink: Neither mosh nor ssh working with Back to My Mac URLs

Created on 26 Feb 2017  Â·  22Comments  Â·  Source: blinksh/blink

The website says there is Back to My Mac support, but I'm not sure how to enable it if it is indeed there. I can connect fine from a Mac to a Mac using ssh or mosh, so I'm pretty sure it's not a port or server or other type of issue. The error messages I get (hostnames etc obfuscated) on my iPhone 6S with iOS 10.2.1 (14D27) and Blink v5.0.1 are:

blink> mosh [email protected]
Could not resolve host address.
Did not find remote IP address.
blink> ssh [email protected]
Could not resolve host address.

Am I missing some setup or config somewhere?

feature

Most helpful comment

The easy way forward would be to suggest to Apple that they bring BTMM support over to iOS. I could make an initial radar with an enhancement request. It would be great if you could dupe it in order for it to get some traction.

Even if you are able to implement a workaround OS level support is the long term goal.

All 22 comments

Not that I know of, usually that gets resolved just fine and it is actually iCloud doing that, no magic going on. That should work on any computer really. Can you do a --verbose and see if there is any more information? Thanks for your message!

Thanks for your reply.

My understanding is that these ipv6 iCloud addresses only work if both machines (server + host) are logged into the same iCloud account and have Back to my Mac enabled (e.g. macOS to macOS). And since there isn't Back to my Mac for iOS yet, I am not sure it works between iOS and macOS?

I'd say it might be a firewall issue or something, but it works fine to connect via mosh from my laptop on the same network, so it must be something specific to the implementation on iOS. Just to confirm, this type of connection works for you to connect from your iOS devices to a macOS device via an iCloud address (as below)?

Here's the verbose output:

blink> mosh [email protected] --verbose
MoshClient:DEBUG:mosh-server new -s -c 256 -l LC_ALL=en_US.UTF-8
MoshClient:DEBUG:ssh -v -t [email protected] -- mosh-server new -s -c 256 -l LC_ALL=en_US.UTF-8
Could not resolve host address.
Did not find remote IP address

blink> ssh -v [email protected]
usage: ssh [options] [user@]hostname [command]
[-l login_name] [-i identity_file] [-p port]
[-t request_tty] [-v verbose]

# force quit, restart blink
blink> ssh -v [email protected]
Could not resolve host address.

Any further thoughts on this? I still can't get it to work.

Same problem. Works from macOS but same experience as @naupaka as well as same result “Could not resolve host address”.

Any thoughts?

I encountered the same issue. It looks like the URL can only be used if the device is also logged in on 'Back to My Mac'. Something that's not possible on iOS.
I can't find this back in any of Apple's documentation, but I can only assume it's an extra security layer.

As an alternative you could look into a Dynamic IP provider.

So this implies that it should never work from iOS (and indeed that no iOS terminal client should be able to do this). Is this indeed the case, or has anyone, ever, got it to work?

See, e.g., https://twitter.com/panic/status/633415078914600960 regarding Panic's Prompt SSH client: "Not possible currently. The BTMM stuff requires some special DNS handling not availabe on iOS." If so, how come http://blink.sh says otherwise?

My hunch is that Blink developers tested it in Xcode/iOS simulator on macOS and it worked fine there (because macOS was handling DNS translation and etc) and no one tested it directly on iOS to find out that it wouldn't work. Just a guess. I think they should remove Back to My Mac support from the list of features.

This was a while ago, so I do not fully remember the details on how I tested it, but I remember it was working. I also remember reading somewhere in the Apple Docs, when trying to figure out whether to use POSIX libraries or the foundation ones, that both would be solving a BTMM socket just fine. Let me see if I can do something, otherwise I will remove it from the list of features.

My apologies if this misguided anyone.

Update due: according to the docs, service discovery is available on both iOS and OS X, there is even a section specifically referencing BTMM but I cannot find it right now. The important thing is, service is visible but it doesn’t get resolved properly. This might be a limitation in iOS, but I think I have an idea to rewrite this and give it a try at least.

I’m prioritizing libssh though, as I want to push out the door agent, proxy and tunnels, all before Christmas. Will get back to this.

Pleasent surprise if it could be made to work. It would be somewhat of an achievement if BTMM could be made to work. It would significantly change the way I use the iPad for terminal access outside the office.

I was under the impression that Apple did not have support for BTMM in iOS. Then again every moving part of BTMM seems to be open and could potentially be replicated manually. I am missing anything? E.g. service discovery is "just" "regular DNS".

Thanks! Keep up the good work! 🤓

If someone has time, I can put something together so that someone else can connect the dots. It shouldn’t really take more than a couple days but unfortunately I’m swamped with all the new stuff we are preparing for the next release. Hopefully once we have more manpower we will be moving a lot faster.

For what its worth, I just built blink and ran it on the iOS simulator. It was able to connect via the BTMM url just fine. I then installed the executable on my physical iPhone and it was unable to make the very same connection. Same networks, etc. so I believe there is something on the Mac that is bridging the gap. Boy, it would be awesome to figure out how to make this work. Especially if port forwarding via SSH can be enabled. Then we'd able to VNC in from the iPhone.

Reading up on BTMM, it appears there is a part which involves kerberos authentication. That's the part I think might be related to the "logged into same iCloud" account restriction. but then again I'm guessing here...

Whats weird about this is if you use the ssh [email protected] provided in the System preferences it works fine.

But if you try to add it in the host name it cannot resolve. If you then use the IP address of the computer and add that in the Hostname it works just fine.

I believe its an issue in the adding of the hostname in config. Because it can connect with the ssh command and address in System Preferences > Sharing > Remote Connections

@AppleEducate Are you sure that's a BTMM domain? I just looked at my system and the address presented in the System Preferences > Sharing > Remote Connections is only a local domain address to the computer. Something that would allow a direct IP connection (v4 or v6) via either traditional local DNS or bonjour local mDNS lookup. The ipv6 tunnel via the BTMM addresses is of the form "[email protected]"

You might be on to a different issue with a mDNS resolution based connection added as a host not resolving. Perhaps when blinksh makes the connection for a host that is saved in the configuration it only tries to resolve it via DNS.

The easy way forward would be to suggest to Apple that they bring BTMM support over to iOS. I could make an initial radar with an enhancement request. It would be great if you could dupe it in order for it to get some traction.

Even if you are able to implement a workaround OS level support is the long term goal.

I agree. Ill submit one on radar as well

Rody Davis Jr.
Full Stack Mobile Developer
Github | Website | Appstore | LinkedIn
Twitter | Facebook | YouTube

On Mar 12, 2018, 1:07 PM -0400, Niels Castle notifications@github.com, wrote:

The easy way forward would be to suggest to Apple that they bring BTMM support over to iOS. I could make an initial radar with an enhancement request. It would be great if you could dupe it in order for it to get some traction.
Even if you are able to implement a workaround OS level support is the long term goal.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

I just submitted a feature request via radar as well.

Super! Radar filed this end as well 👍

Any updates on this?

https://support.apple.com/en-us/HT208922

Back to My Mac will not be available on macOS Mojave

:(

Was this page helpful?
0 / 5 - 0 ratings