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
Add workaround for buggy ssh password prompt behavior in macOS 10.15.4 #328
Comments
Have the same issue after upgrading to 10.15.4. Seems to be Running the unison cli installed through homebrew works. So it seems to be something to do with the release build. I'm happy to help track this down. Currently trying to build the app to add more debugging. Full output of
|
Using the text ui works but the mac ui doesn't. Seems to be maybe something with pipes and the ssh command but not totally sure. At least this is a work around for now.
|
Great, thank you Samuel! This also did the job to sync my macs. So it must be something with the mac ui if command line entries are working. |
Using "-debug verbose” instead of “-debug all” will print the exact bytes that the client is getting from the ssh process. This may help understand whether the problem is something to do with the communication between the client and the ssh process or something else.
- Benjamin
… On Mar 30, 2020, at 12:17 PM, Samuel Stauffer ***@***.***> wrote:
Have the same issue after upgrading to 10.15.4. Seems to be 2020-03-30 09:13:37.421 Unison[10125:80781] Unrecognized message from ssh:
Running the unison cli installed through homebrew works. So it seems to be something to do with the release build. I'm happy to help track this down. Currently trying to build the app to add more debugging.
Full output of -debug all doesn't seem to show anything useful.
Preferences:
ui = graphic
host =
server = false
prefsdocs = false
doc =
version = false
silent = false
dumbtty = false
testserver = false
showprev = false
selftest = false
confirmmerge = false
retry = 0
repeat =
contactquietly = false
key =
label =
expert = false
height = 15
auto = false
maxthreads = 0
maxsizethreshold = -1
prefer =
force =
sortnewfirst = false
sortbysize = false
keeptempfilesaftermerge = false
diff = diff -u CURRENT2 CURRENT1
copyonconflict = false
backupdir =
maxbackups = 2
backups = false
backupsuffix =
backupprefix = .bak.$VERSION.
backuploc = central
copymax = 1
copyquoterem = default
copythreshold = -1
copyprogrest = rsync --partial --append-verify --compress
copyprog = rsync --partial --inplace --compress
rsync = true
fastcheck = default
ignorelocks = false
dumparchives = false
showarchive = false
rootsName =
ignorearchives = false
fastercheckUNSAFE = false
fat = false
allHostsAreRunningWindows = false
someHostIsRunningWindows = false
confirmbigdel = true
batch = false
root = ***@***.***//home/samuel/unison
root = /Users/samuel/unison
killserver = false
halfduplex = false
stream = true
addversionno = false
servercmd =
sshargs =
rshargs =
rshcmd = rsh
sshcmd = ssh
xferbycopying = true
sshversion =
clientHostName = mycomp.local
ignoreinodenumbers = false
links-aux = true
links = default
times = false
group = false
owner = false
numericids = false
dontchmod = false
perms = 1023
watch = true
rsrc-aux = false
rsrc = default
maxerrors = 1
unicodeCS = false
unicodeEnc = false
unicode = default
someHostIsInsensitive = false
ignorecase = default
timers = false
terse = false
logfile = /Users/samuel/unison.log
log = true
debugtimes = false
debug = all
addprefsto =
[remote] Shell connection: ssh (ssh, -l, samuel, 192.168.84.26, -e, none, unison, -server)
2020-03-30 09:15:43.804 Unison[10150:81885] Unrecognized message from ssh:
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#328 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABVQQC65F7WVTSX2TWHLECLRKDAZBANCNFSM4LVAGYPA>.
|
Same problem here, Unison not working since the update to 10.15.4. |
Still not working after 'macOS Catalina 10.15.4 Supplemental Update' on both machines |
Using
|
log = true |
Looks like this message is coming from line 489 of uimac/MyController.m and the message from ssh that it can’t interpret is the empty string (or a string containing just blanks).
If somebody wants to do a little objective C programming, one could try to protect all the calls to raisePasswordWindow with a little loop that throws away empty prompts from ssh.
… On Apr 10, 2020, at 2:54 AM, h2k82u ***@***.***> wrote:
log = true
debugtimes = false
debug = verbose
addprefsto =
[remote] Shell connection: ssh (ssh, -l, bs, 192.168.178.7, -e, none, /usr/local/bin/unison, -server)
2020-04-10 08:44:46.053 Unison[5178:185556] Unrecognized message from ssh:
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#328 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABVQQC4D6KUG35PB2IK7QQTRL27DHANCNFSM4LVAGYPA>.
|
same problem for me... both using pre-compiled binary and macports version. and the text interface works for me too. |
Open a shell and use ssh-add |
I'm on Catalina 10.15.4. I typed |
I am clueless. Just can mention I sync between Catalina 10.15.4 and Ubuntu 20.04. |
@g8u: |
(un)fortunately I haven't got a second Mac. As far as I understand Unison shows an error if it receives an unexpected answer (as I just experienced painfully until getting Unison working again in my environment) |
I am synching with a previous version OS Mac and this solution unfortunately did not help. The identity was added, but the unison window is still stuck saying "connecting" and does not prompt for a password. the text version works well, fortunately. |
To find out, whether this is an issue with RSA passphrase handling when $ ssh-keygen -p |
SOLVED! for me...: I ssh from a terminal on my laptop to the machine with which I would like to sync using unison (my.desktop.company.com). I have a setup (.ssh/config) that allows me to then ssh from a different terminal window with no password to that remote machine, as long as the first ssh command is active. more on that below. I start Unison, graphic version, it connects without requiring a password and works well. The remote hostname in the .unison file needs to be the same name that I use for the first ssh command. as for the .ssh/config setup on my laptop, here it is, probably only some of this is relevant:
|
Thanks! This works for me, too, to sync my Mac laptop with my home desktop. Following your instructions, I ssh in first, using the same hostname as in my .prf file, and then the Unison graphical version works as before, and after syncing I end my ssh session after closing Unison. The contents of my
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Yes, my On my laptop — in both the command line and in Unison settings — I'm using the ssh command that's shown under my desktop Mac's System Preferences > Sharing > Remote Login. So on the command line it's HTH! |
@ETZ1 and @kevinashworth: thank you for your fast response, I really appreciate it! What I don't understand is that Unison was working in the exact setting for more than 5 years until the last Catalina update |
If you follow these instructions, login from the laptop to the remote computer, and then open another terminal on the laptop and ssh, does it require a pw? It should not... |
ok, that seems to be the problem.
I guess, I have to learn more about ssh usage and pitfalls... |
finally got it working! |
My solution was to simply add my public ssh key of my "main unison sync mac" (where I start the GUI) to the For this solution working on my Macs...
If this simple solution does not work for others, maybe a combination of the different approaches may help. (both installations Unison version 2.51.2, ocaml version 4.04.0, binaries directly donwloaded from website) I think unison has some issues with piping/recognizing the password prompt of the ssh connection/command or something like this. But I'm not that familiar with GUI programming and connecting GUIs to cli commands. So it is very speculative. |
Sorry to say … |
Well this is interesting... As you can see in the commit, the message |
I have the working 2.51.4 and its cli binary under /usr. I did not delete them before. I started the test version from the download directory directly. I did not export its cli binary to /usr. But those don’t bring up this message. So … it’s strange?! |
I wonder if there is some binary mixup going on here. Even if you as a user don't see it, all versions without commit a265ec9 are outputting the message |
So what shall we do now? |
Can you start the GUI app in the terminal? (I don't know how it works in macOS) Can you try redirecting it's stderr to a file? By Apple's documentation, this should redirect |
Another thing to try is to temporarily move away all other binaries, make sure that the tested binary really is the one with commit a265ec9, and then try again. |
Before doing that (I don’t know how yet) I deleted my working Unison, replaced it, exported the cli binary to /usr/local/bin. Still same error with a265ec9.
Starting from terminal:
How would you redirect the stderr to a file with bsd, unix oder linux? I’d try that way here. |
Oh … I found out this with locate unison:
Hm, which one is right, which one is wrong?! |
No, no, forget ist, I guess the locate database is old. There is only /usr/local/bin/unison! |
I redirected … but it’s the same output as in the terminal … I tried three profiles to the second Mac. The first did not give an error (!), the second and third gave:
|
Now I’m back again to 2.51.4 – and everything works. |
I have to say, I'm at a loss here. The Line 38 in 3ac6a7f
The same code will then start the real GUI, here: Line 52 in 3ac6a7f
which will then in turn request starting the ssh process and then interact with it. The code for that is here: unison/src/uimac/MyController.m Lines 407 to 519 in 3ac6a7f
All of this is done in a proper Mac "app" (I don't know what's the proper way to call it), the one in Objective C. The I suspect that somehow an incorrect copy of the "app" is found... ?? Is there a way to start the "app" directly, skipping the All possible versions mixups aside, what's more strange is that the |
What do you mean with incorrect copy of the "app"? Which app? The "thing" that is packed and has an icon to click on it? Why should this be incorrect? And why is version 2.51.4 starting without any problems? Well, I don’t understand why it works with one and not with the other. What is the diff? |
Yes, that's what I mean by "app", that "thing" :) I don't know the correct terminology. I have zero experience with macOS. @gdt maybe you have some guidance here? When downloading the binary that includes commit a265ec9, a simple search for string Another thing that I didn't notice before because the error message from the GUI contained less information, in the messages like this:
the process IDs When you receive this error in the GUI, before closing the message window, could you take a snapshot of the process list to see if these are processes on the same machine and what commands are behind them. Sorry, I can't tell you how to view a process list on macOS. Also, you could snapshot the process list on the other machine to see if the other process ID is present there. |
The only really reliable way to be sure one is testing the right code is to remove every single vestige of unison except for what it is being tested. Also, I think it's best to test with command line unison if that can exhibit the bug. Also, it makes sense to do the same purge and install only the testing version on the remote side too. |
I finally figured out what's going on. The "unrecognized message" is in fact coming from the remote machine's stderr. I'll see if I can find a fix. |
I've opened a PR with a proposed fix. @thetrial could you please test a build from https://github.com/bcpierce00/unison/actions/runs/1728155694 If you can, please test as follows:
Note to others willing to test -- this issue and the fix applies only to the uimac GUI, which is the native Mac GUI. It does not affect the GTK GUI. |
I’m going to check these setups in the next two days. Hold the line. |
Fresh from the lab …
I made some more tests in series from the second Mac as local:
¹ This was an intended repetition to ensure. And finally I tried:
Only once. Linux machine crashed. After reboot: OK. ² Here was an IPv6 address. I guess the Linux crash was bad luck. I don’t know if this could be important or become a caveat, so I mention it here. |
Thank you for your testing efforts. Based on the results, I will mark the PR as ready to merge. The Linux crash most likely is unrelated, but it is good to know that real error messages from ssh are properly presented to the user. |
This issue is closed, but I'm experiencing this issue with 2.51.5 (from homebrew). Is there a fix pending in the next version? Thanks to this thread, if I ssh to the other server in a separate terminal first, it works, but otherwise I can only use the text UI.
|
Yes, the fix is not released yet. If you want, you can try out the fix by downloading a pre-built binary at https://github.com/bcpierce00/unison/actions/runs/1733125753 and you have to follow guidelines at https://github.com/bcpierce00/unison/wiki/CI-Binary-instructions |
Which one of those many files would I download? I'm running macOS 12.2 21D49 arm64 -- and my ocaml version is above. |
The macOS GUI: https://github.com/bcpierce00/unison/suites/5026190466/artifacts/148102599 |
Thank you. Using that version I no longer receive the "Unrecognized message from ssh". |
This comment was marked as off-topic.
This comment was marked as off-topic.
Homebrew not having the latest release is not a unison bug. |
Hi,
I am syncing my MacBook and iMac data folders with Unison 2.51.2 for several years now and it worked great.
But after updating macOS Catalina from version 10.15.3 to 10.15.4 released on 23rd March 2020 Unison is not able to connect to the second computer. It is just showing "Connecting..." and nothing more happens.
I already checked the SSH connection between both computer via Terminal and it is working in both directions. Also there was no change in the .prf-file.
Does some has any fix or idea how to solve this?
The text was updated successfully, but these errors were encountered: