Comments (7)
I thought it would be easier to try than to ask!
Yes, when xpra execs ssh, ssh will do whatever it normally does.
Run xpra with Xpra_cmd.exe -d ssh attach ssh://user@host/
to see more details.
from xpra.
If I don't specify --ssh=ssh
, I can connect successfully. But when I add --ssh=ssh
, connection will failed.
"c:\Program Files\Xpra\Xpra_cmd.exe" -d ssh --ssh=ssh attach ssh://[email protected]:40221/100
2024-05-03 22:21:29,452 Xpra GTK3 client version 6.0-r0
2024-05-03 22:21:29,763 running on Microsoft Windows Microsoft Windows Server 2022 Standard
2024-05-03 22:21:29,763 cpython 3.11
2024-05-03 22:21:32,214 GStreamer version 1.24.2
2024-05-03 22:21:32,231 created named pipe 'Xpra\9412'
2024-05-03 22:21:32,560 keyboard layout 'Chinese (Simplified) - US Keyboard' : 'cn' (0x804)
2024-05-03 22:21:32,659 debug enabled for ['xpra.net.ssh.exec_client', 'network', 'ssh']
2024-05-03 22:21:32,665 executing ssh command: ssh -l ubuntu -p 40221 -T 127.0.0.1 'sh -c '"'"'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy "100";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy "100";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy "100";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy "100";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy "100";else echo "no run-xpra command found"; exit 1; fi'"'"''
2024-05-03 22:21:32,676 keyboard settings: layout=cn
2024-05-03 22:21:32,676 desktop size is 1600x1200:
2024-05-03 22:21:32,676 Default (423x317 mm - DPI: 96x96) workarea: 1600x1160
2024-05-03 22:21:32,676 通用非即插即用监视器 (423x318 mm)
2024-05-03 22:21:32,922 SSH EOF on stderr of ['ssh', '-l', 'ubuntu', '-p', '40221', '-T', '127.0.0.1', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy "100";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy "100";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy "100";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy "100";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy "100";else echo "no run-xpra command found"; exit 1; fi\'']
2024-05-03 22:21:32,922 remote SSH stderr:
2024-05-03 22:21:32,922 Error: failed to receive anything, not an xpra server?
2024-05-03 22:21:32,922 Host key verification failed.
2024-05-03 22:21:32,922 could also be the wrong protocol, username, password or port
2024-05-03 22:21:32,922 or the session was not found
2024-05-03 22:21:32,922 Connection failed
from xpra.
Is your ssh server on port 40221? Or is it an xpra server that is forwarded to this port?
The xpra client runs:
ssh -l ubuntu -p 40221 -T 127.0.0.1 'sh -c '"'"'if command -v "xpra" > /dev/null 2>&1; then... '"'"''
The quotes look wrong to me. Perhaps it comes from here:
xpra/xpra/net/ssh/exec_client.py
Lines 88 to 90 in 558127f
In which case running with
xpra_cmd.exe --env=XPRA_SSH_MAGIC_QUOTES=0 ...
might help.from xpra.
I forward remote ssh(22) to local(40221).
I run the following command and paste result.
"c:\Program Files\Xpra\Xpra_cmd.exe" -d ssh attach ssh://[email protected]:40221/100
show remote app sucessfully.
2."c:\Program Files\Xpra\Xpra_cmd.exe" -d ssh --ssh=ssh attach ssh://[email protected]:40221/100
2024-05-05 15:29:11,897 Xpra GTK3 client version 6.0-r0
2024-05-05 15:29:12,230 running on Microsoft Windows Microsoft Windows Server 2022 Standard
2024-05-05 15:29:12,230 cpython 3.11
2024-05-05 15:29:14,638 GStreamer version 1.24.2
2024-05-05 15:29:14,647 created named pipe 'Xpra\8856'
2024-05-05 15:29:14,960 keyboard layout 'Chinese (Simplified) - US Keyboard' : 'cn' (0x804)
2024-05-05 15:29:15,053 debug enabled for ['xpra.net.ssh.exec_client', 'network', 'ssh']
2024-05-05 15:29:15,069 executing ssh command: ssh -l ubuntu -p 40221 -T 127.0.0.1 'sh -c '"'"'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy "100";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy "100";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy "100";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy "100";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy "100";else echo "no run-xpra command found"; exit 1; fi'"'"''
2024-05-05 15:29:15,085 keyboard settings: layout=cn
2024-05-05 15:29:15,093 desktop size is 1600x1200:
2024-05-05 15:29:15,093 Default (423x317 mm - DPI: 96x96) workarea: 1600x1160
2024-05-05 15:29:15,093 通用非即插即用监视器 (423x318 mm)
2024-05-05 15:29:15,337 SSH EOF on stderr of ['ssh', '-l', 'ubuntu', '-p', '40221', '-T', '127.0.0.1', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy "100";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy "100";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy "100";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy "100";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy "100";else echo "no run-xpra command found"; exit 1; fi\'']
2024-05-05 15:29:15,337 remote SSH stderr:
2024-05-05 15:29:15,337 Host key verification failed.
2024-05-05 15:29:15,337 Error: failed to receive anything, not an xpra server?
2024-05-05 15:29:15,337 could also be the wrong protocol, username, password or port
2024-05-05 15:29:15,337 or the session was not found
2024-05-05 15:29:15,337 Connection failed
3.ssh -l ubuntu -p 40221 -T 127.0.0.1 'sh -c '"'"'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy "100";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy "100";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy "100";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy "100";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy "100";else echo "no run-xpra command found"; exit 1; fi'"'"''
The system cannot find the path specified.
4. "c:\Program Files\Xpra\Xpra_cmd.exe" -d ssh --ssh=ssh --env=XPRA_SSH_MAGIC_QUOTES=0 attach ssh://[email protected]:40221/100
2024-05-05 15:32:51,715 Xpra GTK3 client version 6.0-r0
2024-05-05 15:32:52,020 running on Microsoft Windows Microsoft Windows Server 2022 Standard
2024-05-05 15:32:52,030 cpython 3.11
2024-05-05 15:32:54,365 GStreamer version 1.24.2
2024-05-05 15:32:54,371 created named pipe 'Xpra\10572'
2024-05-05 15:32:54,684 keyboard layout 'Chinese (Simplified) - US Keyboard' : 'cn' (0x804)
2024-05-05 15:32:54,784 debug enabled for ['xpra.net.ssh.exec_client', 'network', 'ssh']
2024-05-05 15:32:54,784 executing ssh command: ssh -l ubuntu -p 40221 -T 127.0.0.1 'sh -c '"'"'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy "100";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy "100";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy "100";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy "100";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy "100";else echo "no run-xpra command found"; exit 1; fi'"'"''
2024-05-05 15:32:54,801 keyboard settings: layout=cn
2024-05-05 15:32:54,817 desktop size is 1600x1200:
2024-05-05 15:32:54,817 Default (423x317 mm - DPI: 96x96) workarea: 1600x1160
2024-05-05 15:32:54,817 通用非即插即用监视器 (423x318 mm)
2024-05-05 15:32:55,052 SSH EOF on stderr of ['ssh', '-l', 'ubuntu', '-p', '40221', '-T', '127.0.0.1', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy "100";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy "100";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy "100";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy "100";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy "100";else echo "no run-xpra command found"; exit 1; fi\'']
2024-05-05 15:32:55,052 remote SSH stderr:
2024-05-05 15:32:55,052 Error: failed to receive anything, not an xpra server?
2024-05-05 15:32:55,052 Host key verification failed.
2024-05-05 15:32:55,052 could also be the wrong protocol, username, password or port
2024-05-05 15:32:55,052 or the session was not found
2024-05-05 15:32:55,052 Connection failed
from xpra.
@cadem as per #4207 (comment), have you tried running with magic quotes off?
Silly question: how is ssh
installed on MS Windows?
Using ssh=ssh
is not a supported configuration on MS Windows, ssh=plink
is, and only for non-light builds.
from xpra.
-
I had openssh installed on my windows,
C:\Users\Administrator>ssh -V
OpenSSH_for_Windows_9.4p1, LibreSSL 3.7.3 -
I plink, it works, but plink doesn't support alias name in .ssh/config file.
from xpra.
So, I gave it a go and it is definitely possible, but tricky.
There seems to be some conflict between the system parsing xpra's command, then xpra parsing the ssh
option within that, then the windows shell parsing the command again when we execute ssh..
FWIW, with 6.1-r35740
, I can connect via ssh using openssh:
./Xpra_cmd.exe attach ssh://192.168.0.10:10000/ \
-d ssh --ssh="ssh -v -o UserKnownHostsFile='C:\msys64\home\Windows\ 10\ Test\.ssh\known_hosts'"
But beware that anything which requires user interaction (password or key passphrase, etc) will fail and show this in the output with ssh -v
:
debug1: read_passphrase: can't open /dev/tty: No such device or address
That's because the stdin
, stdout
and stderr
pipes are attached to the parent xpra process so that it can use them to communicate with the remote proxy.
And I have no idea how to tell ssh to use either our own tool for the prompts (what SSH_ASKPASS
is meant to do) or how to make it use another tty.. (ie: tty
outputs /dev/pty0
on my system).
Some links:
- PowerShell Win32-OpenSSH : TTY PTY support in Windows OpenSSH
- sshpass does not work with Windows Terminal app and msys2 console
- MSYS2: Terminals
- How does MSYS2 differ from Cygwin? Automatic path mangling of command line arguments and environment variables to Windows form on the fly: Filesystem namespaces
from xpra.
Related Issues (20)
- "Server does not support speaker forwarding" when connected via SSH HOT 1
- Dithering artifacts with PNG 8 bit colour encoding HOT 7
- OpenGL Error on windows 11 in v6.0 client HOT 6
- Opening "Session Info" while "server is not responding, drawing spinners over the windows", can lead to timeout HOT 18
- Xpra Client not reconnecting after Update to Version 12 HOT 8
- App tray icon didn't show on windows HOT 3
- When using HiDPI, in Ghidra, some window content is not scaled up but some are HOT 4
- Distortions to remote windows after update HOT 19
- make it easier to setup a development environment HOT 1
- make it easier to install the xpra.org repositories HOT 1
- VirtualBox context menus disappear HOT 11
- openh264 encoder error `codec bitstream size is larger than Level limitation` HOT 1
- preserve file order when matching content type mappings
- sometimes Xpra keeps on starting Xvfb-for-Xpra processes endlessly HOT 8
- --without-http broken in 6.0.1 HOT 3
- Password variable --auth=env:name is preserved in Xvfb-for-Xpra-3 process HOT 5
- impossible to access xpra repos HOT 2
- xpra attach from wayland to x11: "connection timed out" HOT 4
- shadow mode @ wayland client: content drawn to just 1/4th of window size HOT 3
- docs: Usage/Desktop.md not found HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xpra.