[winswitch] Unable to attach from Windows

Daniele Polencic daniele.polencic at gmail.com
Mon Aug 6 15:42:26 BST 2018


On Mon, 6 Aug 2018 at 14:25, Antoine Martin via shifter-users <
shifter-users at lists.devloop.org.uk> wrote:

> On 06/08/18 14:46, Daniele Polencic via shifter-users wrote:
> > Hello,
> >
> > I installed Xpra on a Linux VM.
> >
> > From my mac I can SSH into the VM with:
> > ssh workspace
> > and I can attach to an Xpra session with:
> > xpra attach ssh:workspace
> >
> > I tried to do the same on Windows. I can connect to SSH with:
> > ssh workspace
> Is this openssh? from mingw? cygwin?
>

I used Cmder http://cmder.net

Tried with Cygwin, same error.


> > But I can't connect to Xpra. To attach to an existing session I used:
> >
> > "C:\Program Files\Xpra\Xpra_cmd.exe" attach ssh/workspace
> (..)
> > 2018-08-06 13:35:43,593 Error: failed to receive anything, not an xpra
> > server?
> > 2018-08-06 13:35:43,593   could also be the wrong protocol, username,
> > password or port
> > 2018-08-06 13:35:43,609   or maybe this server does not support 'unknown'
> > compression or 'rencode' packet encoding?
> > 2018-08-06 13:35:43,609 Connection lost
> >
> > I tried with the UI and it silently fails. I installed the following
> > binary: https://xpra.org/dists/windows/Xpra-x86_64_Setup.exe
> >
> > The Xpra client on Windows is: v1.0 14492
> That's way too old. (over a year and a half's worth of fixes)


> > The Xpra client on Mac is: xpra v1.0.12-r19800
> Try the latest stable 2.3.x builds for both macos and windows.
> There is absolutely no reason to use the 1.x branch on MacOS or MS
> Windows unless you run Windows XP or MacOS versions older than 10.9
>

Thanks for pointing that out. The links on the home page are pointing to
version 1 of the client. I should have checked.


> > The Xpra server running on Ubuntu is: xpra v2.3.2-r19729
> >
> > Is there anything else I should try?
> Does your system log on the server show a connection attempt at all?
> If so, does the ssh authentication succeed?
>

As I mentioned, I can see a prompt in both Mac and Windows when I type "ssh
workspace".
The connection is working.


> Try to specify your username and maybe even the password on the command
> line:
> xpra_cmd attach ssh://username:password@host/
>

I'm using private keys to connect to SSH, so I won't be able to test the
password. But I tested the user and makes no difference.


> You can also enable ssh debugging with:
> set XPRA_SSH_DEBUG=1
> This will log the exact SSH command line used for connecting to the
> server. You can then run it by hand to see what happens.
>

 mac: xpra v2.2.2-r18017

executing ssh command: "ssh" "-T" "workspace" "sh -c 'xpra initenv;if [ -x
~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy;elif [ -x
$XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra
_proxy;elif type "xpra" > /dev/null 2>&1; then xpra _proxy;elif [ -x
/usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy;else echo "no
run-xpra command found"; exit 1; fi'"

windows: 2.3.2-r19729

executing ssh command: "plink" "-ssh" "-agent" "-T" "workspace" "xpra
initenv;if [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy :1;elif [
-x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra
_proxy :1;elif type "xpra" > /dev/null 2>&1; then xpra _proxy :1;elif [ -x
/usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy :1;else echo "no
run-xpra command found"; exit 1; fi"

I looked into the logs and you're right. I can't see a successful login
with when I attach from windows.

After more digging, I noticed that Xpra client uses plink and not the
standard ssh command. Since plink doesn't know how to look into .ssh/config
the configuration is not picked up and the connection fails.

Plink can read saved sessions from Putty, though. After I configured the
session in Putty I was able to connect to Xpra with:

"C:\Program Files\Xpra\Xpra_cmd.exe" attach ssh:workspace

Mistery unravelled.

Thanks for helping me out.



More information about the shifter-users mailing list